Index: Source/web/InspectorEmulationAgent.cpp |
diff --git a/Source/web/InspectorEmulationAgent.cpp b/Source/web/InspectorEmulationAgent.cpp |
index 4d0895ca6af78f7ac25129de600118cc3661bcaf..d27751e2b01409a4ac6e6e58d74ccf34317e0236 100644 |
--- a/Source/web/InspectorEmulationAgent.cpp |
+++ b/Source/web/InspectorEmulationAgent.cpp |
@@ -36,7 +36,6 @@ InspectorEmulationAgent::InspectorEmulationAgent(WebViewImpl* webViewImpl) |
InspectorEmulationAgent::~InspectorEmulationAgent() |
{ |
- m_webViewImpl->devToolsEmulator()->setEmulationAgent(nullptr); |
} |
void InspectorEmulationAgent::restore() |
@@ -55,6 +54,11 @@ void InspectorEmulationAgent::disable(ErrorString*) |
setEmulatedMedia(&error, String()); |
} |
+void InspectorEmulationAgent::discardAgent() |
+{ |
+ m_webViewImpl->devToolsEmulator()->setEmulationAgent(nullptr); |
+} |
+ |
void InspectorEmulationAgent::didCommitLoadForLocalFrame(LocalFrame* frame) |
{ |
if (frame == m_webViewImpl->mainFrameImpl()->frame()) |