Bug 931887 - No getter_AddRefs for loadInfo.mChannel because HttpChannelChild is not thread-safe, r=bz

This commit is contained in:
Andrea Marchesini 2014-01-26 00:16:46 +00:00
parent 1dd2ba8a1a
commit 841f2c538c

View File

@ -3759,8 +3759,11 @@ WorkerPrivate::GetLoadInfo(JSContext* aCx, nsPIDOMWindow* aWindow,
return NS_ERROR_FAILURE;
}
// StartAssignment() is used instead getter_AddRefs because, getter_AddRefs
// does QI in debug build and, if this worker runs in a child process,
// HttpChannelChild will crash because it's not thread-safe.
rv = ChannelFromScriptURLWorkerThread(aCx, aParent, aScriptURL,
getter_AddRefs(loadInfo.mChannel));
loadInfo.mChannel.StartAssignment());
NS_ENSURE_SUCCESS(rv, rv);
// Now that we've spun the loop there's no guarantee that our parent is