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

Unified Diff: Source/core/inspector/InspectorFrontendHost.cpp

Issue 546633006: [DevTools] Check m_frontendPage in InspectorFrontendHost. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorFrontendHost.cpp
diff --git a/Source/core/inspector/InspectorFrontendHost.cpp b/Source/core/inspector/InspectorFrontendHost.cpp
index db2aefa892760d927062665449bf22e2c9eea3c6..e1afec92d0b206d03d7bb51fca40c9f118deacb4 100644
--- a/Source/core/inspector/InspectorFrontendHost.cpp
+++ b/Source/core/inspector/InspectorFrontendHost.cpp
@@ -146,12 +146,16 @@ void InspectorFrontendHost::disconnectClient()
void InspectorFrontendHost::setZoomFactor(float zoom)
{
+ if (!m_frontendPage)
pfeldman 2014/09/06 10:30:29 Why does this get called after disconnectClient?
dgozman 2014/09/06 10:36:27 That's a reasonable question. The answer is: I don
pfeldman 2014/09/06 10:42:29 Could this be due to microtasks that are dispatchi
+ return;
if (LocalFrame* frame = m_frontendPage->deprecatedLocalMainFrame())
frame->setPageAndTextZoomFactors(zoom, 1);
}
float InspectorFrontendHost::zoomFactor()
{
+ if (!m_frontendPage)
+ return 1;
if (LocalFrame* frame = m_frontendPage->deprecatedLocalMainFrame())
return frame->pageZoomFactor();
return 1;
@@ -159,6 +163,8 @@ float InspectorFrontendHost::zoomFactor()
void InspectorFrontendHost::setInjectedScriptForOrigin(const String& origin, const String& script)
{
+ if (!m_frontendPage)
+ return;
m_frontendPage->inspectorController().setInjectedScriptForOrigin(origin, script);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698