Bug 991753. Make sure we're in the right compartment before we try wrapping our Promise in Promise::GetOrCreateWrapper. r=bholley

This commit is contained in:
Boris Zbarsky 2014-04-03 23:32:11 -04:00
parent e10e715648
commit bed9b485be

View File

@ -254,6 +254,8 @@ Promise::GetOrCreateWrapper(JSContext* aCx)
return nullptr;
}
JSAutoCompartment ac(aCx, scope);
JS::Rooted<JS::Value> val(aCx);
if (!WrapNewBindingObject(aCx, scope, this, &val)) {
MOZ_ASSERT(JS_IsExceptionPending(aCx));