Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1531)

Unified Diff: Source/modules/geolocation/GeolocationController.cpp

Issue 397023003: Preparing Blink for cross-process frame tree replication (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed extra blank line Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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())

Powered by Google App Engine
This is Rietveld 408576698