Backed out changeset 1f45be0c2485 (bug 937317) WinXP Build Bustage on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2013-12-06 08:42:31 +01:00
parent 47c54a0f82
commit fc0c910fca
2 changed files with 1 additions and 35 deletions

View File

@ -94,8 +94,6 @@ void DestroyScriptSettings()
AutoEntryScript::AutoEntryScript(nsIGlobalObject* aGlobalObject,
bool aIsMainThread,
JSContext* aCx)
: mStack(ScriptSettingsStack::Ref())
, mEntry(aGlobalObject, /* aCandidate = */ true)
{
MOZ_ASSERT(aGlobalObject);
if (!aCx) {
@ -116,40 +114,18 @@ AutoEntryScript::AutoEntryScript(nsIGlobalObject* aGlobalObject,
mCxPusher.Push(aCx);
}
mAc.construct(aCx, aGlobalObject->GetGlobalJSObject());
mStack.Push(&mEntry);
}
AutoEntryScript::~AutoEntryScript()
{
MOZ_ASSERT(mStack.Incumbent() == mEntry.mGlobalObject);
mStack.Pop();
}
AutoIncumbentScript::AutoIncumbentScript(nsIGlobalObject* aGlobalObject)
: mStack(ScriptSettingsStack::Ref())
, mEntry(aGlobalObject, /* aCandidate = */ false)
{
mStack.Push(&mEntry);
}
AutoIncumbentScript::~AutoIncumbentScript()
{
MOZ_ASSERT(mStack.Incumbent() == mEntry.mGlobalObject);
mStack.Pop();
MOZ_ASSERT(aGlobalObject);
}
AutoSystemCaller::AutoSystemCaller(bool aIsMainThread)
: mStack(ScriptSettingsStack::Ref())
{
if (aIsMainThread) {
mCxPusher.PushNull();
}
mStack.PushSystem();
}
AutoSystemCaller::~AutoSystemCaller()
{
mStack.Pop();
}
} // namespace dom

View File

@ -27,7 +27,6 @@ namespace dom {
void InitScriptSettings();
void DestroyScriptSettings();
class ScriptSettingsStack;
struct ScriptSettingsStackEntry {
nsCOMPtr<nsIGlobalObject> mGlobalObject;
bool mIsCandidateEntryPoint;
@ -66,11 +65,8 @@ public:
bool aIsMainThread = NS_IsMainThread(),
// Note: aCx is mandatory off-main-thread.
JSContext* aCx = nullptr);
~AutoEntryScript();
private:
dom::ScriptSettingsStack& mStack;
dom::ScriptSettingsStackEntry mEntry;
nsCxPusher mCxPusher;
mozilla::Maybe<JSAutoCompartment> mAc; // This can de-Maybe-fy when mCxPusher
// goes away.
@ -82,10 +78,6 @@ private:
class AutoIncumbentScript {
public:
AutoIncumbentScript(nsIGlobalObject* aGlobalObject);
~AutoIncumbentScript();
private:
dom::ScriptSettingsStack& mStack;
dom::ScriptSettingsStackEntry mEntry;
};
/*
@ -96,9 +88,7 @@ private:
class AutoSystemCaller {
public:
AutoSystemCaller(bool aIsMainThread = NS_IsMainThread());
~AutoSystemCaller();
private:
dom::ScriptSettingsStack& mStack;
nsCxPusher mCxPusher;
};