Skip to content
Commit 8897eaaf authored by joepeck@webkit.org's avatar joepeck@webkit.org
Browse files

Web Inspector: Push InspectorAgent down into JSC, give JSC an InspectorController

https://bugs.webkit.org/show_bug.cgi?id=126763

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Introduce JSGlobalObjectInspectorController. This is the InspectorController
for a JSContext. It is created by the JSGlobalObject Remote Inspector Debuggable
when a remote frontend connects, and is destroyed when the remote frontend
disconnects of the JSGlobalObject is destroyed.

* inspector/JSGlobalObjectInspectorController.h: Added.
* inspector/JSGlobalObjectInspectorController.cpp: Added.
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::~JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::connectFrontend):
(Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
(Inspector::JSGlobalObjectInspectorController::dispatchMessageFromFrontend):
(Inspector::JSGlobalObjectInspectorController::functionCallHandler):
(Inspector::JSGlobalObjectInspectorController::evaluateHandler):
Create/destory agents, create/destroy dispatches, implement InspectorEnvironment.

* runtime/JSGlobalObjectDebuggable.h:
* runtime/JSGlobalObjectDebuggable.cpp:
(JSC::JSGlobalObjectDebuggable::~JSGlobalObjectDebuggable):
(JSC::JSGlobalObjectDebuggable::connect):
(JSC::JSGlobalObjectDebuggable::disconnect):
(JSC::JSGlobalObjectDebuggable::dispatchMessageFromRemoteFrontend):
Forward actions to the InspectorController object.

* inspector/agents/InspectorAgent.h: Renamed from Source/WebCore/inspector/InspectorAgent.h.
* inspector/agents/InspectorAgent.cpp: Renamed from Source/WebCore/inspector/InspectorAgent.cpp.
(Inspector::InspectorAgent::InspectorAgent):
(Inspector::InspectorAgent::~InspectorAgent):
(Inspector::InspectorAgent::didCreateFrontendAndBackend):
(Inspector::InspectorAgent::inspect):
(Inspector::InspectorAgent::evaluateForTestInFrontend):
Implement InspectorAgent in JavaScriptCore in namespace Inspector.

* JavaScriptCore.xcodeproj/project.pbxproj:
* CMakeLists.txt:
* ChangeLog:
* GNUmakefile.am:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/copy-files.cmd:
Add files and new inspector/agents subdirectory.

Source/WebCore:

No new tests, no observable change in functionality.

* CMakeLists.txt:
* ForwardingHeaders/inspector/InspectorAgent.h: Added.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
InspectorAgent moved to JavaScriptCore.

* inspector/PageConsoleAgent.cpp:
(WebCore::PageConsoleAgent::PageConsoleAgent):
(WebCore::PageConsoleAgent::~PageConsoleAgent):
* inspector/PageConsoleAgent.h:
(WebCore::PageConsoleAgent::create):
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
InspectorAgent was not used by these files, remove it.

* inspector/CommandLineAPIHost.cpp:
* inspector/CommandLineAPIHost.h:
(WebCore::CommandLineAPIHost::init):
* inspector/InspectorInstrumentation.cpp:
* inspector/InstrumentingAgents.h:
(WebCore::InstrumentingAgents::inspectorAgent):
(WebCore::InstrumentingAgents::setInspectorAgent):
Switch to Inspector::InspectorAgent where applicable.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorController.h:
Manually add InspectorAgent to the InstrumentingAgents. It is one
of the agents that is always available in InstrumentingAgents.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b8de1141
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment