mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1464134 part 6 - Replace AbstractFramePtr::compartment with AbstractFramePtr::realm. r=anba
This commit is contained in:
parent
2eebe87aa6
commit
7ff3b9af6c
@ -421,7 +421,7 @@ js::DirectEval(JSContext* cx, HandleValue v, MutableHandleValue vp)
|
||||
JSOp(*iter.pc()) == JSOP_STRICTEVAL ||
|
||||
JSOp(*iter.pc()) == JSOP_SPREADEVAL ||
|
||||
JSOp(*iter.pc()) == JSOP_STRICTSPREADEVAL);
|
||||
MOZ_ASSERT(caller.compartment() == caller.script()->compartment());
|
||||
MOZ_ASSERT(caller.realm() == caller.script()->realm());
|
||||
|
||||
RootedObject envChain(cx, caller.environmentChain());
|
||||
return EvalKernel(cx, v, DIRECT_EVAL, caller, envChain, iter.pc(), vp);
|
||||
|
@ -2829,7 +2829,7 @@ DebugEnvironments::onPopVar(JSContext* cx, const EnvironmentIter& ei)
|
||||
void
|
||||
DebugEnvironments::onPopWith(AbstractFramePtr frame)
|
||||
{
|
||||
Realm* realm = JS::GetRealmForCompartment(frame.compartment());
|
||||
Realm* realm = frame.realm();
|
||||
if (DebugEnvironments* envs = realm->debugEnvs())
|
||||
envs->liveEnvs.remove(&frame.environmentChain()->as<WithEnvironmentObject>());
|
||||
}
|
||||
|
@ -1481,7 +1481,7 @@ SavedStacks::insertFrames(JSContext* cx, MutableHandleSavedFrame frame,
|
||||
|
||||
RootedAtom displayAtom(cx, iter.maybeFunctionDisplayAtom());
|
||||
|
||||
auto principals = JS::GetRealmForCompartment(iter.compartment())->principals();
|
||||
auto principals = iter.realm()->principals();
|
||||
MOZ_ASSERT_IF(framePtr && !iter.isWasm(), iter.pc());
|
||||
|
||||
if (!stackChain->emplaceBack(location.source(),
|
||||
|
@ -493,10 +493,10 @@ AbstractFramePtr::pushVarEnvironment(JSContext* cx, HandleScope scope)
|
||||
return js::PushVarEnvironmentObject(cx, scope, *this);
|
||||
}
|
||||
|
||||
inline JSCompartment*
|
||||
AbstractFramePtr::compartment() const
|
||||
inline JS::Realm*
|
||||
AbstractFramePtr::realm() const
|
||||
{
|
||||
return environmentChain()->compartment();
|
||||
return environmentChain()->realm();
|
||||
}
|
||||
|
||||
inline unsigned
|
||||
|
@ -215,7 +215,7 @@ class AbstractFramePtr
|
||||
template <typename SpecificEnvironment>
|
||||
inline void popOffEnvironmentChain();
|
||||
|
||||
inline JSCompartment* compartment() const;
|
||||
inline JS::Realm* realm() const;
|
||||
|
||||
inline bool hasInitialEnvironment() const;
|
||||
inline bool isGlobalFrame() const;
|
||||
|
Loading…
Reference in New Issue
Block a user