Bug 824723: Don't fire error events if the worker is shutting down. r=bent

This commit is contained in:
Kyle Huey 2012-12-31 07:48:57 -08:00
parent 274a68a7bc
commit 0fe5d16d9c

View File

@ -937,9 +937,13 @@ public:
bool
WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
{
JSObject* target = aWorkerPrivate->IsAcceptingEvents() ?
aWorkerPrivate->GetJSObject() :
nullptr;
// Don't fire this event if the JS object has been disconnected from the
// private object.
if (!aWorkerPrivate->IsAcceptingEvents()) {
return true;
}
JSObject* target = aWorkerPrivate->GetJSObject();
uint64_t innerWindowId;