2011-02-14 Pavel Feldman <pfeldman@chromium.org>
[WebKit-https.git] / Source / WebCore / inspector / InspectorController.cpp
index 426e5f3..327d834 100644 (file)
@@ -215,7 +215,10 @@ bool InspectorController::debuggerEnabled()
 
 void InspectorController::showAndEnableDebugger()
 {
-    m_inspectorAgent->showAndEnableDebugger();
+    if (!enabled())
+        return;
+    show();
+    m_inspectorAgent->startUserInitiatedDebugging();
 }
 
 void InspectorController::disableDebugger()
@@ -230,6 +233,9 @@ void InspectorController::startUserInitiatedProfiling()
 
 void InspectorController::stopUserInitiatedProfiling()
 {
+    if (!enabled())
+        return;
+    show();
     m_inspectorAgent->stopUserInitiatedProfiling();
 }