mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1081038 - part2: Removing nsAutoMicroTask where we have AutoEntryScript. r=bholley
This commit is contained in:
parent
bbc7113763
commit
03b8edc061
@ -208,7 +208,6 @@ nsJSUtils::EvaluateString(JSContext* aCx,
|
||||
// set to false.
|
||||
aRetValue.setUndefined();
|
||||
|
||||
nsAutoMicroTask mt;
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
|
||||
|
@ -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>
|
||||
|
@ -392,8 +392,6 @@ nsXBLProtoImplField::InstallField(JS::Handle<JSObject*> aBoundNode,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsAutoMicroTask mt;
|
||||
|
||||
nsAutoCString uriSpec;
|
||||
aBindingDocURI->GetSpec(uriSpec);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user