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: http://svn.webkit.org/repository/webkit/trunk@162757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
41 files changed