Backed out changeset b231da97c3b6 (bug 1278562)

This commit is contained in:
Sebastian Hengst 2016-08-29 19:42:51 +02:00
Родитель 3ecf13b856
Коммит f47f9fc73c
2 изменённых файлов: 8 добавлений и 23 удалений

Просмотреть файл

@ -8633,17 +8633,19 @@ DebuggerObject::promiseStateGetter(JSContext* cx, unsigned argc, Value* vp)
/* static */ bool
DebuggerObject::promiseValueGetter(JSContext* cx, unsigned argc, Value* vp)
{
THIS_DEBUGOBJECT(cx, argc, vp, "get promiseValue", args, object);
THIS_DEBUGOBJECT_OWNER_PROMISE(cx, argc, vp, "get promiseValue", args, dbg, refobj);
if (!DebuggerObject::requirePromise(cx, object))
return false;
if (object->promiseState() != JS::PromiseState::Fulfilled) {
if (promise->state() != JS::PromiseState::Fulfilled) {
args.rval().setUndefined();
return true;
}
return DebuggerObject::getPromiseValue(cx, object, args.rval());;
RootedValue result(cx, promise->value());
if (!dbg->wrapDebuggeeValue(cx, &result))
return false;
args.rval().set(result);
return true;
}
/* static */ bool
@ -9528,18 +9530,6 @@ DebuggerObject::getErrorMessageName(JSContext* cx, HandleDebuggerObject object,
return true;
}
#ifdef SPIDERMONKEY_PROMISE
/* static */ bool
DebuggerObject::getPromiseValue(JSContext* cx, HandleDebuggerObject object,
MutableHandleValue result)
{
MOZ_ASSERT(object->promiseState() == JS::PromiseState::Fulfilled);
result.set(object->promise()->value());
return object->owner()->wrapDebuggeeValue(cx, result);
}
#endif // SPIDERMONKEY_PROMISE
/* static */ bool
DebuggerObject::isExtensible(JSContext* cx, HandleDebuggerObject object, bool& result)
{

Просмотреть файл

@ -1257,11 +1257,6 @@ class DebuggerObject : public NativeObject
MutableHandleDebuggerObject result);
static MOZ_MUST_USE bool getScriptedProxyHandler(JSContext* cx, HandleDebuggerObject object,
MutableHandleDebuggerObject result);
#ifdef SPIDERMONKEY_PROMISE
static MOZ_MUST_USE bool getPromiseValue(JSContext* cx, HandleDebuggerObject object,
MutableHandleValue result);
#endif // SPIDERMONKEY_PROMISE
// Methods
static MOZ_MUST_USE bool isExtensible(JSContext* cx, HandleDebuggerObject object,
bool& result);