| Index: Source/modules/geolocation/GeolocationController.cpp
|
| diff --git a/Source/modules/geolocation/GeolocationController.cpp b/Source/modules/geolocation/GeolocationController.cpp
|
| index 53458c4f325c1fa5ff7fce7e5042fa7fed214de8..80dda2a8d53f635285875b4075a61ff227ad0d0b 100644
|
| --- a/Source/modules/geolocation/GeolocationController.cpp
|
| +++ b/Source/modules/geolocation/GeolocationController.cpp
|
| @@ -50,13 +50,14 @@ GeolocationController::GeolocationController(LocalFrame& frame, GeolocationClien
|
| OwnPtr<GeolocationInspectorAgent> geolocationAgent(GeolocationInspectorAgent::create());
|
| m_inspectorAgent = geolocationAgent.get();
|
| frame.page()->inspectorController().registerModuleAgent(geolocationAgent.release());
|
| - } else {
|
| + } else if (frame.page()->mainFrame()->isLocalFrame()) {
|
| m_inspectorAgent = GeolocationController::from(frame.page()->deprecatedLocalMainFrame())->m_inspectorAgent;
|
| }
|
|
|
| - m_inspectorAgent->AddController(this);
|
| + if (m_inspectorAgent)
|
| + m_inspectorAgent->AddController(this);
|
|
|
| - if (!frame.isMainFrame()) {
|
| + if (!frame.isMainFrame() && frame.page()->mainFrame()->isLocalFrame()) {
|
| // internals.setGeolocationClientMock is per page.
|
| GeolocationController* mainController = GeolocationController::from(frame.page()->deprecatedLocalMainFrame());
|
| if (mainController->hasClientForTest())
|
|
|