[Cleanup] Remove ScriptGlobalObject
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Aug 2017 17:59:54 +0000 (17:59 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Aug 2017 17:59:54 +0000 (17:59 +0000)
commit1336a10fe9566a3c0790e001e5c42ccec519a583
tree05b0ee00832c61176b7bf2b33d8c63a2b0d7757f
parentbbfda2c17ff198c9d9e846c2432b0330d8adcd36
[Cleanup] Remove ScriptGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=175173

Reviewed by Darin Adler.

Source/WebCore:

ScriptGlobalObject's two functions were only being used in
four places. Three of those uses (ScriptGlobalObject::set in
InspectorFrontendClientLocal, WebInspectorUI, and RemoteWebInspectorUI)
were merged into the new function addSelfToGlobalObjectInWorld on
InspectorFrontendHost. The remaining function (ScriptGlobalObject::get
in InspectorFrontendHost) was easily inlined.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/ScriptGlobalObject.cpp: Removed.
* bindings/js/ScriptGlobalObject.h: Removed.
Removed ScriptGlobalObject.

* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::windowObjectCleared):
Remove call to ScriptGlobalObject::set and use addSelfToGlobalObjectInWorld instead.

* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::showContextMenu):
Inline ScriptGlobalObject::get.

(WebCore::InspectorFrontendHost::addSelfToGlobalObjectInWorld):
Add helper which inlines ScriptGlobalObject::set and works
as a helper for the three inspector frontends.

Source/WebKit:

* WebProcess/WebPage/RemoteWebInspectorUI.cpp:
(WebKit::RemoteWebInspectorUI::windowObjectCleared):
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::windowObjectCleared):
Remove call to ScriptGlobalObject::set and use addSelfToGlobalObjectInWorld instead.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/ScriptGlobalObject.cpp [deleted file]
Source/WebCore/bindings/js/ScriptGlobalObject.h [deleted file]
Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
Source/WebCore/inspector/InspectorFrontendHost.cpp
Source/WebCore/inspector/InspectorFrontendHost.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp
Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp