Chromium Code Reviews| 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); |
| } |