Move JavaScriptCallFrame and ScriptDebugServer into JavaScriptCore for inspector
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Jan 2014 04:42:25 +0000 (04:42 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Jan 2014 04:42:25 +0000 (04:42 +0000)
commita1a67e7a50502cfa8264210d24f9201fd94e6426
treef922e079702de16256175c12487240d6adcdaa2a
parent83c188d8af918bae5ce009d2cdf8fcff3f8b9647
Move JavaScriptCallFrame and ScriptDebugServer into JavaScriptCore for inspector
https://bugs.webkit.org/show_bug.cgi?id=127543

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add new files.

* inspector/ScriptDebugListener.h:
Extract WebCore knowledge from ScriptDebugServer. This will
eventually be made to work outside of WebCore.

* inspector/ScriptDebugServer.h: Renamed from Source/WebCore/bindings/js/ScriptDebugServer.h.
* inspector/ScriptDebugServer.cpp: Renamed from Source/WebCore/bindings/js/ScriptDebugServer.cpp.
(Inspector::ScriptDebugServer::evaluateBreakpointAction):
(Inspector::ScriptDebugServer::dispatchDidPause):
(Inspector::ScriptDebugServer::dispatchBreakpointActionLog):
(Inspector::ScriptDebugServer::dispatchBreakpointActionSound):
(Inspector::ScriptDebugServer::sourceParsed):
(Inspector::ScriptDebugServer::dispatchFunctionToListeners):
(Inspector::ScriptDebugServer::handlePause):
Modernize code, and call the new ScriptDebugListener callbacks where appropriate.

* inspector/JSJavaScriptCallFrame.cpp: Renamed from Source/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp.
(Inspector::JSJavaScriptCallFrame::JSJavaScriptCallFrame):
(Inspector::JSJavaScriptCallFrame::finishCreation):
(Inspector::JSJavaScriptCallFrame::createPrototype):
(Inspector::JSJavaScriptCallFrame::destroy):
(Inspector::JSJavaScriptCallFrame::releaseImpl):
(Inspector::JSJavaScriptCallFrame::~JSJavaScriptCallFrame):
(Inspector::JSJavaScriptCallFrame::evaluate):
(Inspector::JSJavaScriptCallFrame::scopeType):
(Inspector::JSJavaScriptCallFrame::caller):
(Inspector::JSJavaScriptCallFrame::sourceID):
(Inspector::JSJavaScriptCallFrame::line):
(Inspector::JSJavaScriptCallFrame::column):
(Inspector::JSJavaScriptCallFrame::functionName):
(Inspector::JSJavaScriptCallFrame::scopeChain):
(Inspector::JSJavaScriptCallFrame::thisObject):
(Inspector::JSJavaScriptCallFrame::type):
(Inspector::toJS):
(Inspector::toJSJavaScriptCallFrame):
* inspector/JSJavaScriptCallFrame.h: Added.
(Inspector::JSJavaScriptCallFrame::createStructure):
(Inspector::JSJavaScriptCallFrame::create):
(Inspector::JSJavaScriptCallFrame::impl):
* inspector/JSJavaScriptCallFramePrototype.cpp: Added.
(Inspector::JSJavaScriptCallFramePrototype::finishCreation):
(Inspector::jsJavaScriptCallFramePrototypeFunctionEvaluate):
(Inspector::jsJavaScriptCallFramePrototypeFunctionScopeType):
(Inspector::jsJavaScriptCallFrameAttributeCaller):
(Inspector::jsJavaScriptCallFrameAttributeSourceID):
(Inspector::jsJavaScriptCallFrameAttributeLine):
(Inspector::jsJavaScriptCallFrameAttributeColumn):
(Inspector::jsJavaScriptCallFrameAttributeFunctionName):
(Inspector::jsJavaScriptCallFrameAttributeScopeChain):
(Inspector::jsJavaScriptCallFrameAttributeThisObject):
(Inspector::jsJavaScriptCallFrameAttributeType):
(Inspector::jsJavaScriptCallFrameConstantGLOBAL_SCOPE):
(Inspector::jsJavaScriptCallFrameConstantLOCAL_SCOPE):
(Inspector::jsJavaScriptCallFrameConstantWITH_SCOPE):
(Inspector::jsJavaScriptCallFrameConstantCLOSURE_SCOPE):
(Inspector::jsJavaScriptCallFrameConstantCATCH_SCOPE):
* inspector/JSJavaScriptCallFramePrototype.h: Added.
(Inspector::JSJavaScriptCallFramePrototype::create):
(Inspector::JSJavaScriptCallFramePrototype::createStructure):
(Inspector::JSJavaScriptCallFramePrototype::JSJavaScriptCallFramePrototype):
* inspector/JavaScriptCallFrame.cpp: Renamed from Source/WebCore/bindings/js/JavaScriptCallFrame.cpp.
(Inspector::JavaScriptCallFrame::caller):
* inspector/JavaScriptCallFrame.h: Renamed from Source/WebCore/bindings/js/JavaScriptCallFrame.h.
Port of JavaScriptCallFrame.idl to a set of native JS classes.

Source/WebCore:

Covered by existing tests.

* ForwardingHeaders/inspector/ScriptDebugServer.h: Added.
* GNUmakefile.list.am:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* inspector/JavaScriptCallFrame.idl: Removed.
Update builds now that ScriptDebugServer moved to JavaScriptCore.

* bindings/js/PageScriptDebugServer.h:
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
(WebCore::PageScriptDebugServer::isContentScript):
(WebCore::PageScriptDebugServer::reportException):
* bindings/js/WorkerScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
(WebCore::WorkerScriptDebugServer::reportException):
Handle ScriptDebugServer functionality depending on WebCore knowledge.

* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::breakpointActionSound):
Handle ScriptDebugServer functionality that depended on WebCore knowledge.
This will eventually be written in a non-WebCore specific way.

* inspector/InspectorRuntimeAgent.cpp:
* inspector/InspectorRuntimeAgent.h:
Update ScriptDebugServer type now that it is in namespace Inspector.

* workers/WorkerGlobalScope.h:
Make addConsoleMessage public again so the inspector can call it.

* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::breakpointActionLog):
* inspector/PageDebuggerAgent.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::breakpointActionLog):
* inspector/WorkerDebuggerAgent.h:
Let each of these handle console logs in their own way. Both of these
eventually go through the PageConsole and log through the InspectorConsoleAgent
and ChromeClient.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
40 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.list.am
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/inspector/JSInjectedScriptHost.h
Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.cpp [moved from Source/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp with 53% similarity]
Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.h [new file with mode: 0644]
Source/JavaScriptCore/inspector/JSJavaScriptCallFramePrototype.cpp [new file with mode: 0644]
Source/JavaScriptCore/inspector/JSJavaScriptCallFramePrototype.h [new file with mode: 0644]
Source/JavaScriptCore/inspector/JavaScriptCallFrame.cpp [moved from Source/WebCore/bindings/js/JavaScriptCallFrame.cpp with 94% similarity]
Source/JavaScriptCore/inspector/JavaScriptCallFrame.h [moved from Source/WebCore/bindings/js/JavaScriptCallFrame.h with 93% similarity]
Source/JavaScriptCore/inspector/ScriptDebugListener.h
Source/JavaScriptCore/inspector/ScriptDebugServer.cpp [moved from Source/WebCore/bindings/js/ScriptDebugServer.cpp with 86% similarity]
Source/JavaScriptCore/inspector/ScriptDebugServer.h [moved from Source/WebCore/bindings/js/ScriptDebugServer.h with 76% similarity]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/ForwardingHeaders/inspector/ScriptDebugServer.h [new file with mode: 0644]
Source/WebCore/GNUmakefile.list.am
Source/WebCore/UseJSC.cmake
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/PageScriptDebugServer.cpp
Source/WebCore/bindings/js/PageScriptDebugServer.h
Source/WebCore/bindings/js/WorkerScriptDebugServer.cpp
Source/WebCore/bindings/js/WorkerScriptDebugServer.h
Source/WebCore/inspector/InspectorDebuggerAgent.cpp
Source/WebCore/inspector/InspectorDebuggerAgent.h
Source/WebCore/inspector/InspectorRuntimeAgent.cpp
Source/WebCore/inspector/InspectorRuntimeAgent.h
Source/WebCore/inspector/JavaScriptCallFrame.idl [deleted file]
Source/WebCore/inspector/PageDebuggerAgent.cpp
Source/WebCore/inspector/PageDebuggerAgent.h
Source/WebCore/inspector/WorkerDebuggerAgent.cpp
Source/WebCore/inspector/WorkerDebuggerAgent.h
Source/WebCore/workers/WorkerGlobalScope.h