Web Inspector: Move InspectorRuntimeAgent into JavaScriptCore
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Jan 2014 17:48:16 +0000 (17:48 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Jan 2014 17:48:16 +0000 (17:48 +0000)
commitca6726ed8da6267dda30fbf8ddba56ec9e15ae97
tree157eaa7f2d526da29b254405f815fa9ecc7cf3a8
parentea79303a930eca08f80a9e0c1af316313b3db7aa
Web Inspector: Move InspectorRuntimeAgent into JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=127605

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

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

* inspector/agents/InspectorRuntimeAgent.h: Renamed from Source/WebCore/inspector/InspectorRuntimeAgent.h.
* inspector/agents/InspectorRuntimeAgent.cpp: Renamed from Source/WebCore/inspector/InspectorRuntimeAgent.cpp.
(Inspector::InspectorRuntimeAgent::InspectorRuntimeAgent):
(Inspector::InspectorRuntimeAgent::parse):
(Inspector::InspectorRuntimeAgent::evaluate):
(Inspector::InspectorRuntimeAgent::callFunctionOn):
(Inspector::InspectorRuntimeAgent::getProperties):
- Move the agent into JavaScriptCore.
- Modernize and cleanup.
- Make globalVM a pure virtual function for subclasses to implement.

* inspector/agents/JSGlobalObjectRuntimeAgent.h: Added.
* inspector/agents/JSGlobalObjectRuntimeAgent.cpp: Added.
(Inspector::JSGlobalObjectRuntimeAgent::JSGlobalObjectRuntimeAgent):
(Inspector::JSGlobalObjectRuntimeAgent::didCreateFrontendAndBackend):
(Inspector::JSGlobalObjectRuntimeAgent::willDestroyFrontendAndBackend):
(Inspector::JSGlobalObjectRuntimeAgent::globalVM):
(Inspector::JSGlobalObjectRuntimeAgent::injectedScriptForEval):
Straightforward JSGlobalObject implementation.

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
Add a runtime agent when inspecting a JSContext!

Source/WebCore:

Covered by existing tests. No change in functionality.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
Remove WebCore InspectorRuntimeAgent.

* ForwardingHeaders/inspector/agents/InspectorRuntimeAgent.h: Added.
Add JavaScriptCore InspectorRuntimeAgent.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/WorkerInspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
New constructors for the runtime agent.

* inspector/PageRuntimeAgent.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::PageRuntimeAgent):
(WebCore::PageRuntimeAgent::enable):
(WebCore::PageRuntimeAgent::disable):
(WebCore::PageRuntimeAgent::didCreateMainWorldContext):
(WebCore::PageRuntimeAgent::didCreateIsolatedContext):
(WebCore::PageRuntimeAgent::globalVM):
Modernize and implement globalVM.

* inspector/WorkerRuntimeAgent.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
(WebCore::WorkerRuntimeAgent::injectedScriptForEval):
(WebCore::WorkerRuntimeAgent::globalVM):
Modernize and implement globalVM.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.list.am
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp
Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp [moved from Source/WebCore/inspector/InspectorRuntimeAgent.cpp with 90% similarity]
Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h [moved from Source/WebCore/inspector/InspectorRuntimeAgent.h with 57% similarity]
Source/JavaScriptCore/inspector/agents/JSGlobalObjectRuntimeAgent.cpp [new file with mode: 0644]
Source/JavaScriptCore/inspector/agents/JSGlobalObjectRuntimeAgent.h [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/ForwardingHeaders/inspector/agents/InspectorRuntimeAgent.h [new file with mode: 0644]
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/inspector/InspectorAllInOne.cpp
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/PageRuntimeAgent.cpp
Source/WebCore/inspector/PageRuntimeAgent.h
Source/WebCore/inspector/WorkerInspectorController.cpp
Source/WebCore/inspector/WorkerInspectorController.h
Source/WebCore/inspector/WorkerRuntimeAgent.cpp
Source/WebCore/inspector/WorkerRuntimeAgent.h