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
Родитель 9aaa0f7b86
Коммит cd4dea4900
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -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