Bug 1261814: Use the presence of the content global, and not any random global, to determine whether to run the close handler. r=bz

This commit is contained in:
Kyle Huey 2016-04-05 20:12:56 -07:00
parent b98d3ef86c
commit dca62fc1ed

View File

@ -5702,7 +5702,7 @@ WorkerPrivate::NotifyInternal(JSContext* aCx, Status aStatus)
// If the worker script never ran, or failed to compile, we don't need to do
// anything else, except pretend that we ran the close handler.
if (!JS::CurrentGlobalOrNull(aCx)) {
if (!GlobalScope()) {
mCloseHandlerStarted = true;
mCloseHandlerFinished = true;
return true;