Bug 1081038 - part2: Removing nsAutoMicroTask where we have AutoEntryScript. r=bholley

This commit is contained in:
Gabor Krizsanits 2014-11-14 16:46:26 +01:00
parent bbc7113763
commit 03b8edc061
5 changed files with 1 additions and 18 deletions

View File

@ -208,7 +208,6 @@ nsJSUtils::EvaluateString(JSContext* aCx,
// set to false.
aRetValue.setUndefined();
nsAutoMicroTask mt;
nsresult rv = NS_OK;
nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();

View File

@ -57,10 +57,6 @@ CallbackObject::CallSetup::CallSetup(CallbackObject* aCallback,
, mExceptionHandling(aExceptionHandling)
, mIsMainThread(NS_IsMainThread())
{
if (mIsMainThread) {
nsContentUtils::EnterMicroTask();
}
// Compute the caller's subject principal (if necessary) early, before we
// do anything that might perturb the relevant state.
nsIPrincipal* webIDLCallerPrincipal = nullptr;
@ -274,12 +270,6 @@ CallbackObject::CallSetup::~CallSetup()
mAutoIncumbentScript.reset();
mAutoEntryScript.reset();
// It is important that this is the last thing we do, after leaving the
// compartment and undoing all our entry/incumbent script changes
if (mIsMainThread) {
nsContentUtils::LeaveMicroTask();
}
}
already_AddRefed<nsISupports>

View File

@ -392,8 +392,6 @@ nsXBLProtoImplField::InstallField(JS::Handle<JSObject*> aBoundNode,
return NS_OK;
}
nsAutoMicroTask mt;
nsAutoCString uriSpec;
aBindingDocURI->GetSpec(uriSpec);

View File

@ -292,8 +292,6 @@ nsXBLProtoImplAnonymousMethod::Execute(nsIContent* aBoundElement, JSAddonId* aAd
return NS_OK;
}
nsAutoMicroTask mt;
// We are going to run script via JS::Call, so we need a script entry point,
// but as this is XBL related it does not appear in the HTML spec.
dom::AutoEntryScript aes(global);

View File

@ -3573,9 +3573,7 @@ XULDocument::ExecuteScript(nsXULPrototypeScript *aScript)
JS::HandleScript scriptObject = aScript->GetScriptObject();
NS_ENSURE_TRUE(scriptObject, NS_ERROR_UNEXPECTED);
// Execute the precompiled script with the given version
nsAutoMicroTask mt;
// Execute the precompiled script with the given version.
// We're about to run script via JS::CloneAndExecuteScript, so we need an
// AutoEntryScript. This is Gecko specific and not in any spec.
AutoEntryScript aes(mScriptGlobalObject);