mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Followup for bug 1246091 to fix the rooting hazard, get us closer to reopening the CLOSED TREE, and reduce philor's blood pressure.
This commit is contained in:
parent
7192c2be5a
commit
12e6e3f600
@ -1495,6 +1495,8 @@ Console::PopulateConsoleObjectInTheTargetScope(JSContext* aCx,
|
||||
MOZ_ASSERT(aData);
|
||||
MOZ_ASSERT(aTargetScope);
|
||||
|
||||
JS::Rooted<JSObject*> targetScope(aCx, aTargetScope);
|
||||
|
||||
ConsoleStackEntry frame;
|
||||
if (aData->mTopStackFrame) {
|
||||
frame = *aData->mTopStackFrame;
|
||||
@ -1590,7 +1592,7 @@ Console::PopulateConsoleObjectInTheTargetScope(JSContext* aCx,
|
||||
aData->mCountValue);
|
||||
}
|
||||
|
||||
JSAutoCompartment ac2(aCx, aTargetScope);
|
||||
JSAutoCompartment ac2(aCx, targetScope);
|
||||
|
||||
if (NS_WARN_IF(!ToJSValue(aCx, event, aEventValue))) {
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user