mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1279313 part 2. Use an AutoEntryScript when resolving or rejecting a Promise from C++, in case we are resolving with an object and plan to call the "then" getter.
This commit is contained in:
parent
eb139d85bf
commit
bcb0a973fb
@ -430,11 +430,8 @@ private:
|
||||
void MaybeSomething(T& aArgument, MaybeFunc aFunc) {
|
||||
MOZ_ASSERT(PromiseObj()); // It was preserved!
|
||||
|
||||
AutoJSAPI jsapi;
|
||||
if (!jsapi.Init(mGlobal)) {
|
||||
return;
|
||||
}
|
||||
JSContext* cx = jsapi.cx();
|
||||
AutoEntryScript aes(mGlobal, "Promise resolution or rejection");
|
||||
JSContext* cx = aes.cx();
|
||||
|
||||
JS::Rooted<JS::Value> val(cx);
|
||||
if (!ToJSValue(cx, aArgument, &val)) {
|
||||
|
Loading…
Reference in New Issue
Block a user