--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -8091,20 +8091,20 @@ DebuggerObject_getPromiseID(JSContext* c
return true;
}
static bool
DebuggerObject_getPromiseDependentPromises(JSContext* cx, unsigned argc, Value* vp)
{
THIS_DEBUGOBJECT_OWNER_PROMISE(cx, argc, vp, "get promiseDependentPromises", args, dbg, refobj);
- Rooted<GCVector<Value>> values(cx, GCVector<Value>());
+ Rooted<GCVector<Value>> values(cx, GCVector<Value>(cx));
{
JSAutoCompartment ac(cx, promise);
- if (!promise->dependentPromises(cx, values))
+ if (!promise->dependentPromises(cx, &values))
return false;
}
for (size_t i = 0; i < values.length(); i++) {
if (!dbg->wrapDebuggeeValue(cx, values[i]))
return false;
}
RootedArrayObject promises(cx);
if (values.length() == 0)
@@ -8839,17 +8839,17 @@ DebuggerObject::initClass(JSContext* cx,
RootedObject objProto(cx, global->getOrCreateObjectPrototype(cx));
RootedNativeObject objectProto(cx, InitClass(cx, debugCtor, objProto, &class_,
DebuggerObject_construct, 0, properties_,
methods_, nullptr, nullptr));
#ifdef SPIDERMONKEY_PROMISE
if (!DefinePropertiesAndFunctions(cx, objectProto, promiseProperties_, nullptr))
- return false;
+ return nullptr;
#endif // SPIDERMONKEY_PROMISE
return objectProto;
}
/* static */ DebuggerObject*
DebuggerObject::create(JSContext* cx, HandleObject proto, HandleObject referent,
HandleNativeObject debugger)
@@ -9425,21 +9425,16 @@ JS_DefineDebuggerObject(JSContext* cx, H
nullptr, nullptr);
if (!sourceProto)
return false;
objectProto = DebuggerObject::initClass(cx, obj, debugCtor);
if (!objectProto)
return false;
-#ifdef SPIDERMONKEY_PROMISE
- if (!DefinePropertiesAndFunctions(cx, objectProto, DebuggerObject::promiseProperties_, nullptr))
- return false;
-#endif // SPIDERMONKEY_PROMISE
-
envProto = InitClass(cx, debugCtor, objProto, &DebuggerEnv_class,
DebuggerEnv_construct, 0,
DebuggerEnv_properties, DebuggerEnv_methods,
nullptr, nullptr);
if (!envProto)
return false;
memoryProto = InitClass(cx, debugCtor, objProto, &DebuggerMemory::class_,