diff options
Diffstat (limited to 'dom/xhr')
-rw-r--r-- | dom/xhr/XMLHttpRequestString.cpp | 3 | ||||
-rw-r--r-- | dom/xhr/XMLHttpRequestWorker.cpp | 13 |
2 files changed, 7 insertions, 9 deletions
diff --git a/dom/xhr/XMLHttpRequestString.cpp b/dom/xhr/XMLHttpRequestString.cpp index 8f9092243a..e0e68f3d2d 100644 --- a/dom/xhr/XMLHttpRequestString.cpp +++ b/dom/xhr/XMLHttpRequestString.cpp @@ -58,8 +58,7 @@ class XMLHttpRequestStringBuffer final { // XXX: Bug 1408793 suggests encapsulating the following sequence within // DOMString. - nsStringBuffer* buf = nsStringBuffer::FromString(mData); - if (buf) { + if (nsStringBuffer* buf = mData.GetStringBuffer()) { // We have to use SetStringBuffer, because once we release our mutex mData // can get mutated from some other thread while the DOMString is still // alive. diff --git a/dom/xhr/XMLHttpRequestWorker.cpp b/dom/xhr/XMLHttpRequestWorker.cpp index 67cba876db..974b465aa6 100644 --- a/dom/xhr/XMLHttpRequestWorker.cpp +++ b/dom/xhr/XMLHttpRequestWorker.cpp @@ -290,8 +290,7 @@ class MainThreadProxyRunnable : public MainThreadWorkerSyncRunnable { MainThreadProxyRunnable(WorkerPrivate* aWorkerPrivate, Proxy* aProxy, const char* aName = "MainThreadProxyRunnable") - : MainThreadWorkerSyncRunnable(aWorkerPrivate, aProxy->GetEventTarget(), - aName), + : MainThreadWorkerSyncRunnable(aProxy->GetEventTarget(), aName), mProxy(aProxy) { MOZ_ASSERT(aProxy); } @@ -777,9 +776,9 @@ void Proxy::Teardown() { if (mSyncLoopTarget) { // We have an unclosed sync loop. Fix that now. RefPtr<MainThreadStopSyncLoopRunnable> runnable = - new MainThreadStopSyncLoopRunnable( - mWorkerPrivate, std::move(mSyncLoopTarget), NS_ERROR_FAILURE); - MOZ_ALWAYS_TRUE(runnable->Dispatch()); + new MainThreadStopSyncLoopRunnable(std::move(mSyncLoopTarget), + NS_ERROR_FAILURE); + MOZ_ALWAYS_TRUE(runnable->Dispatch(mWorkerPrivate)); } mOutstandingSendCount = 0; @@ -886,7 +885,7 @@ Proxy::HandleEvent(Event* aEvent) { } if (runnable) { - runnable->Dispatch(); + runnable->Dispatch(mWorkerPrivate); } } @@ -924,7 +923,7 @@ LoadStartDetectionRunnable::Run() { RefPtr<ProxyCompleteRunnable> runnable = new ProxyCompleteRunnable(mWorkerPrivate, mProxy, mChannelId); - if (runnable->Dispatch()) { + if (runnable->Dispatch(mWorkerPrivate)) { mProxy->mWorkerPrivate = nullptr; mProxy->mSyncLoopTarget = nullptr; mProxy->mOutstandingSendCount--; |