Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 589721 - Segfault when closing remote tab with open geolocation p…

…rompt. r=dougt a=blocking-fennec=2.0a1+

--HG--
branch : GECKO20b5pre_20100820_RELBRANCH
  • Loading branch information...
commit 4d81a23329643faffe8638670bbc94eabef33cb2 1 parent 5298efe
@jdm jdm authored
Showing with 8 additions and 3 deletions.
  1. +2 −0  dom/ipc/TabChild.cpp
  2. +6 −3 dom/src/geolocation/nsGeolocation.cpp
View
2  dom/ipc/TabChild.cpp
@@ -86,6 +86,7 @@
#include "nsSerializationHelper.h"
#include "nsIFrame.h"
#include "nsIView.h"
+#include "nsGeolocation.h"
#ifdef MOZ_WIDGET_QT
#include <QX11EmbedWidget>
@@ -983,6 +984,7 @@ TabChild::AllocPGeolocationRequest(const IPC::URI&)
bool
TabChild::DeallocPGeolocationRequest(PGeolocationRequestChild* actor)
{
+ static_cast<nsGeolocationRequest*>(actor)->Release();
return true;
}
View
9 dom/src/geolocation/nsGeolocation.cpp
@@ -1019,10 +1019,13 @@ nsGeolocation::RegisterRequestWithPrompt(nsGeolocationRequest* request)
// the one and only TabChild.
TabChild* child = GetTabChildFrom(window->GetDocShell());
- PGeolocationRequestChild* a =
- child->SendPGeolocationRequestConstructor(request, IPC::URI(mURI));
+ child->SendPGeolocationRequestConstructor(request, IPC::URI(mURI));
+
+ // Retain a reference so the object isn't deleted without IPDL's knowledge.
+ // Corresponding release occurs in DeallocPGeolocationRequest.
+ request->AddRef();
- (void) a->Sendprompt();
+ unused << request->Sendprompt();
return;
}
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.