Bug 906371 - Don't UnblockOnload when dealing with scripts parsed off thread until after they have executed.
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 15 Sep 2013 20:58:41 -0600
changeset 160264 26b48b6dbff4ca8d83b81307da0eea5e3663f41d
parent 160263 2980ed8667f3fa8f65699d0c9644410aad3eb6e8
child 160265 6a16ae20601751299bec39198a744a3afced8da3
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs906371
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 906371 - Don't UnblockOnload when dealing with scripts parsed off thread until after they have executed.
content/base/src/nsScriptLoader.cpp
--- a/content/base/src/nsScriptLoader.cpp
+++ b/content/base/src/nsScriptLoader.cpp
@@ -711,19 +711,19 @@ public:
 
 } /* anonymous namespace */
 
 nsresult
 nsScriptLoader::ProcessOffThreadRequest(void **aOffThreadToken)
 {
     nsCOMPtr<nsScriptLoadRequest> request = mOffThreadScriptRequest;
     mOffThreadScriptRequest = nullptr;
+    nsresult rv = ProcessRequest(request, aOffThreadToken);
     mDocument->UnblockOnload(false);
-
-    return ProcessRequest(request, aOffThreadToken);
+    return rv;
 }
 
 NS_IMETHODIMP
 NotifyOffThreadScriptLoadCompletedRunnable::Run()
 {
     MOZ_ASSERT(NS_IsMainThread());
 
     nsresult rv = mLoader->ProcessOffThreadRequest(&mToken);