зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset b47a1a49cda2 (bug 1274193) for hopefully fixing e10s windows x64 crashes on a CLOSED TREE
This commit is contained in:
Родитель
1233cee71f
Коммит
ca8ef860d0
|
@ -403,7 +403,7 @@ js::RunningWithTrustedPrincipals(JSContext* cx)
|
|||
JS_FRIEND_API(JSFunction*)
|
||||
js::GetOutermostEnclosingFunctionOfScriptedCaller(JSContext* cx)
|
||||
{
|
||||
ScriptFrameIter iter(cx, FrameIter::GO_THROUGH_SAVED);
|
||||
ScriptFrameIter iter(cx, FrameIter::STOP_AT_SAVED);
|
||||
|
||||
// Skip eval frames.
|
||||
while (!iter.done() && iter.isEvalFrame())
|
||||
|
@ -415,16 +415,11 @@ js::GetOutermostEnclosingFunctionOfScriptedCaller(JSContext* cx)
|
|||
if (!iter.isFunctionFrame())
|
||||
return nullptr;
|
||||
|
||||
if (iter.compartment() != cx->compartment())
|
||||
return nullptr;
|
||||
|
||||
RootedFunction curr(cx, iter.callee(cx));
|
||||
for (StaticScopeIter<NoGC> i(curr); !i.done(); i++) {
|
||||
if (i.type() == StaticScopeIter<NoGC>::Function)
|
||||
curr = &i.fun();
|
||||
}
|
||||
|
||||
assertSameCompartment(cx, curr);
|
||||
return curr;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче