From 5bbad614c9f9745102b2f8c7c84a8d14e427a79a Mon Sep 17 00:00:00 2001 From: Tim Taubert Date: Wed, 29 Jan 2014 12:32:50 -0800 Subject: [PATCH] Bug 965468 - Make LoadStartDetectionRunnable wait for loadstart r=bent --- dom/workers/XMLHttpRequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/workers/XMLHttpRequest.cpp b/dom/workers/XMLHttpRequest.cpp index abc2f0209226..7569a66c9fed 100644 --- a/dom/workers/XMLHttpRequest.cpp +++ b/dom/workers/XMLHttpRequest.cpp @@ -1070,7 +1070,7 @@ Proxy::HandleEvent(nsIDOMEvent* aEvent) nsRefPtr runnable = new LoadStartDetectionRunnable(this, mXMLHttpRequestPrivate); - if (NS_FAILED(NS_DispatchToCurrentThread(runnable))) { + if (!runnable->RegisterAndDispatch()) { NS_WARNING("Failed to dispatch LoadStartDetectionRunnable!"); } }