diff options
Diffstat (limited to 'dom')
-rw-r--r-- | dom/base/nsGlobalWindow.cpp | 7 | ||||
-rw-r--r-- | dom/base/nsObjectLoadingContent.cpp | 6 | ||||
-rw-r--r-- | dom/media/MediaResource.cpp | 2 | ||||
-rw-r--r-- | dom/network/UDPSocketChild.cpp | 23 |
4 files changed, 24 insertions, 14 deletions
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index f9126f4da..afaa24f09 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -2504,8 +2504,7 @@ nsGlobalWindow::WouldReuseInnerWindow(nsIDocument* aNewDocument) } bool equal; - if (NS_SUCCEEDED(mDoc->NodePrincipal()->Equals(aNewDocument->NodePrincipal(), - &equal)) && + if (NS_SUCCEEDED(mDoc->NodePrincipal()->EqualsConsideringDomain(aNewDocument->NodePrincipal(), &equal)) && equal) { // The origin is the same. return true; @@ -9335,7 +9334,7 @@ nsGlobalWindow::EnterModalState() topWin->mSuspendedDoc = topDoc; if (topDoc) { - topDoc->SuppressEventHandling(nsIDocument::eEvents); + topDoc->SuppressEventHandling(nsIDocument::eAnimationsOnly); } nsGlobalWindow* inner = topWin->GetCurrentInnerWindowInternal(); @@ -9372,7 +9371,7 @@ nsGlobalWindow::LeaveModalState() if (topWin->mSuspendedDoc) { nsCOMPtr<nsIDocument> currentDoc = topWin->GetExtantDoc(); - topWin->mSuspendedDoc->UnsuppressEventHandlingAndFireEvents(nsIDocument::eEvents, + topWin->mSuspendedDoc->UnsuppressEventHandlingAndFireEvents(nsIDocument::eAnimationsOnly, currentDoc == topWin->mSuspendedDoc); topWin->mSuspendedDoc = nullptr; } diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp index c1b732258..3c850c4cd 100644 --- a/dom/base/nsObjectLoadingContent.cpp +++ b/dom/base/nsObjectLoadingContent.cpp @@ -715,11 +715,13 @@ nsObjectLoadingContent::UnbindFromTree(bool aDeep, bool aNullParent) /// would keep the docshell around, but trash the frameloader UnloadObject(); } - nsIDocument* doc = thisContent->GetComposedDoc(); - if (doc && doc->IsActive()) { + if (mType == eType_Plugin) { + nsIDocument* doc = thisContent->GetComposedDoc(); + if (doc && doc->IsActive()) { nsCOMPtr<nsIRunnable> ev = new nsSimplePluginEvent(doc, NS_LITERAL_STRING("PluginRemoved")); NS_DispatchToCurrentThread(ev); + } } } diff --git a/dom/media/MediaResource.cpp b/dom/media/MediaResource.cpp index d36783be7..84a8d67fd 100644 --- a/dom/media/MediaResource.cpp +++ b/dom/media/MediaResource.cpp @@ -1525,7 +1525,7 @@ void BaseMediaResource::SetLoadInBackground(bool aLoadInBackground) { NS_WARNING("Null owner in MediaResource::SetLoadInBackground()"); return; } - dom::HTMLMediaElement* element = owner->GetMediaElement(); + RefPtr<dom::HTMLMediaElement> element = owner->GetMediaElement(); if (!element) { NS_WARNING("Null element in MediaResource::SetLoadInBackground()"); return; diff --git a/dom/network/UDPSocketChild.cpp b/dom/network/UDPSocketChild.cpp index 6e374ce31..d205e7e8a 100644 --- a/dom/network/UDPSocketChild.cpp +++ b/dom/network/UDPSocketChild.cpp @@ -172,19 +172,28 @@ UDPSocketChild::Bind(nsIUDPSocketInternal* aSocket, NS_ENSURE_ARG(aSocket); - mSocket = aSocket; - AddIPDLReference(); + if (NS_IsMainThread()) { + if (!gNeckoChild->SendPUDPSocketConstructor( + this, IPC::Principal(aPrincipal), mFilterName)) { + return NS_ERROR_FAILURE; + } + } else { + if (!mBackgroundManager) { + return NS_ERROR_NOT_AVAILABLE; + } - if (mBackgroundManager) { // If we want to support a passed-in principal here we'd need to // convert it to a PrincipalInfo MOZ_ASSERT(!aPrincipal); - mBackgroundManager->SendPUDPSocketConstructor(this, void_t(), mFilterName); - } else { - gNeckoChild->SendPUDPSocketConstructor(this, IPC::Principal(aPrincipal), - mFilterName); + if (!mBackgroundManager->SendPUDPSocketConstructor( + this, void_t(), mFilterName)) { + return NS_ERROR_FAILURE; + } } + mSocket = aSocket; + AddIPDLReference(); + SendBind(UDPAddressInfo(nsCString(aHost), aPort), aAddressReuse, aLoopback, recvBufferSize, sendBufferSize); return NS_OK; |