Index: Source/modules/geolocation/GeolocationController.cpp |
diff --git a/Source/modules/geolocation/GeolocationController.cpp b/Source/modules/geolocation/GeolocationController.cpp |
index fea1c7b2a6f8f2bea904eaf825289a49d74d8e4e..96b83e1c9d365b009a1788ae9035538694814516 100644 |
--- a/Source/modules/geolocation/GeolocationController.cpp |
+++ b/Source/modules/geolocation/GeolocationController.cpp |
@@ -41,7 +41,7 @@ GeolocationController::GeolocationController(LocalFrame& frame, GeolocationClien |
, m_client(client) |
, m_hasClientForTest(false) |
, m_isClientUpdating(false) |
- , m_inspectorAgent() |
+ , m_inspectorAgent(nullptr) |
eseidel
2014/07/28 17:51:08
I'm confused why this change is needed?
This is a
kenrb
2014/07/28 18:06:20
In release builds yes, but in debug it RawPtr gets
|
{ |
// FIXME: Once GeolocationInspectorAgent is per frame, there will be a 1:1 relationship between |
// it and this class. Until then, there's one GeolocationInspectorAgent per page that the main |
@@ -54,7 +54,10 @@ GeolocationController::GeolocationController(LocalFrame& frame, GeolocationClien |
m_inspectorAgent = GeolocationController::from(frame.page()->deprecatedLocalMainFrame())->m_inspectorAgent; |
} |
- m_inspectorAgent->addController(this); |
+ // m_inspectorAgent is 0 for out of process iframe instantiations, since inspector is currently unable |
+ // to handle that scenario. |
+ if (m_inspectorAgent) |
+ m_inspectorAgent->addController(this); |
if (!frame.isMainFrame() && frame.page()->mainFrame()->isLocalFrame()) { |
// internals.setGeolocationClientMock is per page. |