Issue #316 - Make the memory GC performance object conditional (WIP)

This was only added for GCubench and likely interfering with building
without devtools-server.
This commit is contained in:
wolfbeast 2020-02-20 12:00:26 +01:00 committed by Roy Tam
commit 1e553d0e73
11 changed files with 36 additions and 0 deletions

View file

@ -7090,6 +7090,7 @@ NewGlobalObject(JSContext* cx, JS::CompartmentOptions& options,
if (!DefineOS(cx, glob, fuzzingSafe, &gOutFile, &gErrFile))
return nullptr;
#ifdef MOZ_DEVTOOLS_SERVER
RootedObject performanceObj(cx, JS_NewObject(cx, nullptr));
if (!performanceObj)
return nullptr;
@ -7105,6 +7106,7 @@ NewGlobalObject(JSContext* cx, JS::CompartmentOptions& options,
return nullptr;
if (!JS_DefineProperty(cx, mozMemoryObj, "gc", gcObj, JSPROP_ENUMERATE))
return nullptr;
#endif
/* Initialize FakeDOMObject. */
static const js::DOMCallbacks DOMcallbacks = {