Web Inspector: do not use InspectorInstrumentation::hasFrontends() check when collect...
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2012 09:41:19 +0000 (09:41 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2012 09:41:19 +0000 (09:41 +0000)
commite07cbfea8b5edb9aec52820409826938e2f520e3
treeb3f1dc56d528771b564ded8a3d7985cd145c139a
parent84a06e513335cf9c0b036415aff0c6c47274d4bf
Web Inspector: do not use InspectorInstrumentation::hasFrontends() check when collecting stacks
https://bugs.webkit.org/show_bug.cgi?id=96730

Reviewed by Vsevolod Vlasov.

- Introduced InspectorInstrumentation::console|timeline|runtime|canvasAgentEnabled
- Using it all over the place instead of the hasFrontend (the latter is now only used once to guard hot path)
- Introduced explicit "enabled" state of the console and runtime agents

* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::getContext):
* bindings/js/JSMainThreadExecState.h:
(WebCore::JSMainThreadExecState::instrumentFunctionCall):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::create):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackForConsole):
* bindings/js/ScriptCallStackFactory.h:
(WebCore):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallWith):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateCallWith):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
(WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackCallback):
* bindings/v8/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackForConsole):
* bindings/v8/ScriptCallStackFactory.h:
(WebCore):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::callFunctionWithInstrumentation):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
* bindings/v8/V8WorkerContextEventListener.cpp:
(WebCore::V8WorkerContextEventListener::callListenerFunction):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::WindowSetTimeoutImpl):
* bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
(WebCore::V8HTMLCanvasElement::getContextCallback):
* bindings/v8/custom/V8WorkerContextCustom.cpp:
(WebCore::SetTimeoutOrInterval):
* inspector/Inspector.json:
* inspector/InspectorConsoleAgent.cpp:
(WebCore):
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::enable):
(WebCore::InspectorConsoleAgent::disable):
(WebCore::InspectorConsoleAgent::clearMessages):
(WebCore::InspectorConsoleAgent::clearFrontend):
(WebCore::InspectorConsoleAgent::addConsoleMessage):
* inspector/InspectorConsoleAgent.h:
(WebCore::InspectorConsoleAgent::enabled):
(InspectorConsoleAgent):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::canvasAgentEnabled):
(WebCore::InspectorInstrumentation::consoleAgentEnabled):
(WebCore::InspectorInstrumentation::runtimeAgentEnabled):
(WebCore::InspectorInstrumentation::timelineAgentEnabled):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::canvasAgentEnabled):
(WebCore::InspectorInstrumentation::consoleAgentEnabled):
(WebCore::InspectorInstrumentation::runtimeAgentEnabled):
(WebCore::InspectorInstrumentation::timelineAgentEnabled):
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
* inspector/InspectorRuntimeAgent.h:
(WebCore::InspectorRuntimeAgent::enabled):
(WebCore::InspectorRuntimeAgent::enable):
(WebCore::InspectorRuntimeAgent::disable):
(InspectorRuntimeAgent):
* inspector/PageRuntimeAgent.cpp:
(PageRuntimeAgentState):
(WebCore::PageRuntimeAgent::clearFrontend):
(WebCore::PageRuntimeAgent::restore):
(WebCore):
(WebCore::PageRuntimeAgent::enable):
(WebCore::PageRuntimeAgent::disable):
(WebCore::PageRuntimeAgent::didClearWindowObject):
(WebCore::PageRuntimeAgent::didCreateIsolatedContext):
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):
* inspector/PageRuntimeAgent.h:
(PageRuntimeAgent):
* inspector/WorkerRuntimeAgent.cpp:
* inspector/WorkerRuntimeAgent.h:
* inspector/front-end/RuntimeModel.js:
(WebInspector.RuntimeModel.prototype._didLoadCachedResources):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
Source/WebCore/bindings/js/JSMainThreadExecState.h
Source/WebCore/bindings/js/ScheduledAction.cpp
Source/WebCore/bindings/js/ScriptCallStackFactory.cpp
Source/WebCore/bindings/js/ScriptCallStackFactory.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
Source/WebCore/bindings/v8/ScriptCallStackFactory.cpp
Source/WebCore/bindings/v8/ScriptCallStackFactory.h
Source/WebCore/bindings/v8/ScriptController.cpp
Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
Source/WebCore/bindings/v8/V8WorkerContextEventListener.cpp
Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
Source/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorConsoleAgent.cpp
Source/WebCore/inspector/InspectorConsoleAgent.h
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/InspectorRuntimeAgent.cpp
Source/WebCore/inspector/InspectorRuntimeAgent.h
Source/WebCore/inspector/PageRuntimeAgent.cpp
Source/WebCore/inspector/PageRuntimeAgent.h
Source/WebCore/inspector/WorkerRuntimeAgent.cpp
Source/WebCore/inspector/WorkerRuntimeAgent.h
Source/WebCore/inspector/front-end/RuntimeModel.js
Source/WebCore/page/DOMWindow.cpp