Rename JSDOMWindowShell to JSDOMWindowProxy to match the HTML5 spec.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Jun 2017 16:47:42 +0000 (16:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Jun 2017 16:47:42 +0000 (16:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80733

Patch by Sam Weinig <sam@webkit.org> on 2017-06-13
Reviewed by Chris Dumez.

Source/WebCore:

Goodbye dear shell.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::~DOMWrapperWorld):
(WebCore::DOMWrapperWorld::clearWrappers):
* bindings/js/DOMWrapperWorld.h:
(WebCore::DOMWrapperWorld::didCreateWindowProxy):
(WebCore::DOMWrapperWorld::didDestroyWindowProxy):
(WebCore::DOMWrapperWorld::didCreateWindowShell): Deleted.
(WebCore::DOMWrapperWorld::didDestroyWindowShell): Deleted.
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::JSDOMWindowBase):
(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::JSDOMWindowBase::willRemoveFromWindowProxy):
(WebCore::JSDOMWindowBase::proxy):
(WebCore::toJSDOMWindow):
(WebCore::JSDOMWindowBase::willRemoveFromWindowShell): Deleted.
(WebCore::JSDOMWindowBase::shell): Deleted.
* bindings/js/JSDOMWindowBase.h:
(WebCore::toJS):
(WebCore::toJSDOMWindow):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::toWrapped):
* bindings/js/JSDOMWindowCustom.h:
* bindings/js/JSDOMWindowProperties.h:
(WebCore::JSDOMWindowProperties::JSDOMWindowProperties):
* bindings/js/JSDOMWindowProxy.cpp: Copied from WebCore/bindings/js/JSDOMWindowShell.cpp.
(WebCore::JSDOMWindowProxy::JSDOMWindowProxy):
(WebCore::JSDOMWindowProxy::finishCreation):
(WebCore::JSDOMWindowProxy::destroy):
(WebCore::JSDOMWindowProxy::setWindow):
(WebCore::JSDOMWindowProxy::wrapped):
(WebCore::JSDOMWindowProxy::toWrapped):
(WebCore::toJS):
(WebCore::toJSDOMWindowProxy):
(WebCore::JSDOMWindowShell::JSDOMWindowShell): Deleted.
(WebCore::JSDOMWindowShell::finishCreation): Deleted.
(WebCore::JSDOMWindowShell::destroy): Deleted.
(WebCore::JSDOMWindowShell::setWindow): Deleted.
(WebCore::JSDOMWindowShell::wrapped): Deleted.
(WebCore::JSDOMWindowShell::toWrapped): Deleted.
(WebCore::toJSDOMWindowShell): Deleted.
* bindings/js/JSDOMWindowProxy.h: Copied from WebCore/bindings/js/JSDOMWindowShell.h.
(WebCore::JSDOMWindowProxy::create):
(WebCore::toJSDOMWindowProxy):
(WebCore::JSDOMWindowShell::window): Deleted.
(WebCore::JSDOMWindowShell::create): Deleted.
(WebCore::JSDOMWindowShell::createStructure): Deleted.
(WebCore::JSDOMWindowShell::world): Deleted.
(WebCore::toJSDOMWindowShell): Deleted.
* bindings/js/JSDOMWindowShell.cpp: Removed.
* bindings/js/JSDOMWindowShell.h: Removed.
* bindings/js/JSEventTargetCustom.cpp:
(WebCore::JSEventTarget::toWrapped):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::open):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptController.cpp:
(WebCore::collectGarbageAfterWindowProxyDestruction):
(WebCore::ScriptController::~ScriptController):
(WebCore::ScriptController::destroyWindowProxy):
(WebCore::ScriptController::createWindowProxy):
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::loadModuleScriptInWorld):
(WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
(WebCore::ScriptController::evaluateModule):
(WebCore::ScriptController::windowProxies):
(WebCore::ScriptController::clearWindowProxiesNotMatchingDOMWindow):
(WebCore::ScriptController::setDOMWindowForWindowProxy):
(WebCore::ScriptController::initScript):
(WebCore::ScriptController::setupModuleScriptHandlers):
(WebCore::ScriptController::eventHandlerPosition):
(WebCore::ScriptController::enableEval):
(WebCore::ScriptController::disableEval):
(WebCore::ScriptController::canAccessFromCurrentOrigin):
(WebCore::ScriptController::attachDebugger):
(WebCore::ScriptController::updateDocument):
(WebCore::ScriptController::cacheableBindingRootObject):
(WebCore::ScriptController::bindingRootObject):
(WebCore::ScriptController::createRootObject):
(WebCore::ScriptController::collectIsolatedContexts):
(WebCore::ScriptController::windowScriptNPObject):
(WebCore::ScriptController::jsObjectForPluginElement):
(WebCore::ScriptController::cleanupScriptObjectsForPlugin):
(WebCore::ScriptController::clearScriptObjects):
(WebCore::ScriptController::executeIfJavaScriptURL):
(WebCore::collectGarbageAfterWindowShellDestruction): Deleted.
(WebCore::ScriptController::destroyWindowShell): Deleted.
(WebCore::ScriptController::createWindowShell): Deleted.
(WebCore::ScriptController::windowShells): Deleted.
(WebCore::ScriptController::clearWindowShellsNotMatchingDOMWindow): Deleted.
(WebCore::ScriptController::setDOMWindowForWindowShell): Deleted.
* bindings/js/ScriptController.h:
(WebCore::ScriptController::windowProxy):
(WebCore::ScriptController::existingWindowProxy):
(WebCore::ScriptController::globalObject):
(WebCore::ScriptController::windowShell): Deleted.
(WebCore::ScriptController::existingWindowShell): Deleted.
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::windowScriptObject):
* bindings/js/ScriptState.cpp:
(WebCore::mainWorldExecState):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateOverloadDispatcher):
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodOverloadDispatcher):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
* page/Frame.cpp:
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::didCreateWindowProxy):
(WebCore::ContentSecurityPolicy::didCreateWindowShell): Deleted.
* page/csp/ContentSecurityPolicy.h:

Source/WebInspectorUI:

* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot.prototype._isNodeGlobalObject):

Source/WebKit/mac:

* DOM/DOMUtility.mm:
(createDOMWrapper):
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
* WebView/WebFrame.mm:
(-[WebFrame _attachScriptDebugger]):
(-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):

Source/WebKit/win:

* WebFrame.cpp:
(WebFrame::stringByEvaluatingJavaScriptInScriptWorld):

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowScriptNPObject):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218179 268f45cc-cd09-0410-ab3c-d52691b4dbfc

37 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/DOMWrapperWorld.cpp
Source/WebCore/bindings/js/DOMWrapperWorld.h
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/JSDOMWindowBase.cpp
Source/WebCore/bindings/js/JSDOMWindowBase.h
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSDOMWindowCustom.h
Source/WebCore/bindings/js/JSDOMWindowProperties.h
Source/WebCore/bindings/js/JSDOMWindowProxy.cpp [moved from Source/WebCore/bindings/js/JSDOMWindowShell.cpp with 81% similarity]
Source/WebCore/bindings/js/JSDOMWindowProxy.h [moved from Source/WebCore/bindings/js/JSDOMWindowShell.h with 78% similarity]
Source/WebCore/bindings/js/JSEventTargetCustom.cpp
Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp
Source/WebCore/bindings/js/ScheduledAction.cpp
Source/WebCore/bindings/js/ScriptCachedFrameData.cpp
Source/WebCore/bindings/js/ScriptController.cpp
Source/WebCore/bindings/js/ScriptController.h
Source/WebCore/bindings/js/ScriptControllerMac.mm
Source/WebCore/bindings/js/ScriptState.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/csp/ContentSecurityPolicy.cpp
Source/WebCore/page/csp/ContentSecurityPolicy.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/DOM/DOMUtility.mm
Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebFrame.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/PluginView.cpp

index 08cf6bc..3fe925c 100644 (file)
@@ -1169,7 +1169,7 @@ set(WebCore_SOURCES
     bindings/js/JSDOMWindowBase.cpp
     bindings/js/JSDOMWindowCustom.cpp
     bindings/js/JSDOMWindowProperties.cpp
-    bindings/js/JSDOMWindowShell.cpp
+    bindings/js/JSDOMWindowProxy.cpp
     bindings/js/JSDOMWrapper.cpp
     bindings/js/JSDOMWrapperCache.cpp
     bindings/js/JSDocumentCustom.cpp
index 8714e33..84a4250 100644 (file)
@@ -1,3 +1,134 @@
+2017-06-13  Sam Weinig  <sam@webkit.org>
+
+        Rename JSDOMWindowShell to JSDOMWindowProxy to match the HTML5 spec.
+        https://bugs.webkit.org/show_bug.cgi?id=80733
+
+        Reviewed by Chris Dumez.
+
+        Goodbye dear shell.
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/DOMWrapperWorld.cpp:
+        (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
+        (WebCore::DOMWrapperWorld::clearWrappers):
+        * bindings/js/DOMWrapperWorld.h:
+        (WebCore::DOMWrapperWorld::didCreateWindowProxy):
+        (WebCore::DOMWrapperWorld::didDestroyWindowProxy):
+        (WebCore::DOMWrapperWorld::didCreateWindowShell): Deleted.
+        (WebCore::DOMWrapperWorld::didDestroyWindowShell): Deleted.
+        * bindings/js/JSBindingsAllInOne.cpp:
+        * bindings/js/JSDOMWindowBase.cpp:
+        (WebCore::JSDOMWindowBase::JSDOMWindowBase):
+        (WebCore::JSDOMWindowBase::finishCreation):
+        (WebCore::JSDOMWindowBase::willRemoveFromWindowProxy):
+        (WebCore::JSDOMWindowBase::proxy):
+        (WebCore::toJSDOMWindow):
+        (WebCore::JSDOMWindowBase::willRemoveFromWindowShell): Deleted.
+        (WebCore::JSDOMWindowBase::shell): Deleted.
+        * bindings/js/JSDOMWindowBase.h:
+        (WebCore::toJS):
+        (WebCore::toJSDOMWindow):
+        * bindings/js/JSDOMWindowCustom.cpp:
+        (WebCore::JSDOMWindow::toWrapped):
+        * bindings/js/JSDOMWindowCustom.h:
+        * bindings/js/JSDOMWindowProperties.h:
+        (WebCore::JSDOMWindowProperties::JSDOMWindowProperties):
+        * bindings/js/JSDOMWindowProxy.cpp: Copied from WebCore/bindings/js/JSDOMWindowShell.cpp.
+        (WebCore::JSDOMWindowProxy::JSDOMWindowProxy):
+        (WebCore::JSDOMWindowProxy::finishCreation):
+        (WebCore::JSDOMWindowProxy::destroy):
+        (WebCore::JSDOMWindowProxy::setWindow):
+        (WebCore::JSDOMWindowProxy::wrapped):
+        (WebCore::JSDOMWindowProxy::toWrapped):
+        (WebCore::toJS):
+        (WebCore::toJSDOMWindowProxy):
+        (WebCore::JSDOMWindowShell::JSDOMWindowShell): Deleted.
+        (WebCore::JSDOMWindowShell::finishCreation): Deleted.
+        (WebCore::JSDOMWindowShell::destroy): Deleted.
+        (WebCore::JSDOMWindowShell::setWindow): Deleted.
+        (WebCore::JSDOMWindowShell::wrapped): Deleted.
+        (WebCore::JSDOMWindowShell::toWrapped): Deleted.
+        (WebCore::toJSDOMWindowShell): Deleted.
+        * bindings/js/JSDOMWindowProxy.h: Copied from WebCore/bindings/js/JSDOMWindowShell.h.
+        (WebCore::JSDOMWindowProxy::create):
+        (WebCore::toJSDOMWindowProxy):
+        (WebCore::JSDOMWindowShell::window): Deleted.
+        (WebCore::JSDOMWindowShell::create): Deleted.
+        (WebCore::JSDOMWindowShell::createStructure): Deleted.
+        (WebCore::JSDOMWindowShell::world): Deleted.
+        (WebCore::toJSDOMWindowShell): Deleted.
+        * bindings/js/JSDOMWindowShell.cpp: Removed.
+        * bindings/js/JSDOMWindowShell.h: Removed.
+        * bindings/js/JSEventTargetCustom.cpp:
+        (WebCore::JSEventTarget::toWrapped):
+        * bindings/js/JSHTMLDocumentCustom.cpp:
+        (WebCore::JSHTMLDocument::open):
+        * bindings/js/ScheduledAction.cpp:
+        (WebCore::ScheduledAction::execute):
+        * bindings/js/ScriptCachedFrameData.cpp:
+        (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
+        (WebCore::ScriptCachedFrameData::restore):
+        * bindings/js/ScriptController.cpp:
+        (WebCore::collectGarbageAfterWindowProxyDestruction):
+        (WebCore::ScriptController::~ScriptController):
+        (WebCore::ScriptController::destroyWindowProxy):
+        (WebCore::ScriptController::createWindowProxy):
+        (WebCore::ScriptController::evaluateInWorld):
+        (WebCore::ScriptController::loadModuleScriptInWorld):
+        (WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
+        (WebCore::ScriptController::evaluateModule):
+        (WebCore::ScriptController::windowProxies):
+        (WebCore::ScriptController::clearWindowProxiesNotMatchingDOMWindow):
+        (WebCore::ScriptController::setDOMWindowForWindowProxy):
+        (WebCore::ScriptController::initScript):
+        (WebCore::ScriptController::setupModuleScriptHandlers):
+        (WebCore::ScriptController::eventHandlerPosition):
+        (WebCore::ScriptController::enableEval):
+        (WebCore::ScriptController::disableEval):
+        (WebCore::ScriptController::canAccessFromCurrentOrigin):
+        (WebCore::ScriptController::attachDebugger):
+        (WebCore::ScriptController::updateDocument):
+        (WebCore::ScriptController::cacheableBindingRootObject):
+        (WebCore::ScriptController::bindingRootObject):
+        (WebCore::ScriptController::createRootObject):
+        (WebCore::ScriptController::collectIsolatedContexts):
+        (WebCore::ScriptController::windowScriptNPObject):
+        (WebCore::ScriptController::jsObjectForPluginElement):
+        (WebCore::ScriptController::cleanupScriptObjectsForPlugin):
+        (WebCore::ScriptController::clearScriptObjects):
+        (WebCore::ScriptController::executeIfJavaScriptURL):
+        (WebCore::collectGarbageAfterWindowShellDestruction): Deleted.
+        (WebCore::ScriptController::destroyWindowShell): Deleted.
+        (WebCore::ScriptController::createWindowShell): Deleted.
+        (WebCore::ScriptController::windowShells): Deleted.
+        (WebCore::ScriptController::clearWindowShellsNotMatchingDOMWindow): Deleted.
+        (WebCore::ScriptController::setDOMWindowForWindowShell): Deleted.
+        * bindings/js/ScriptController.h:
+        (WebCore::ScriptController::windowProxy):
+        (WebCore::ScriptController::existingWindowProxy):
+        (WebCore::ScriptController::globalObject):
+        (WebCore::ScriptController::windowShell): Deleted.
+        (WebCore::ScriptController::existingWindowShell): Deleted.
+        * bindings/js/ScriptControllerMac.mm:
+        (WebCore::ScriptController::windowScriptObject):
+        * bindings/js/ScriptState.cpp:
+        (WebCore::mainWorldExecState):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        (GenerateOverloadDispatcher):
+        (GenerateImplementation):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodOverloadDispatcher):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::clear):
+        (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
+        * page/Frame.cpp:
+        * page/csp/ContentSecurityPolicy.cpp:
+        (WebCore::ContentSecurityPolicy::didCreateWindowProxy):
+        (WebCore::ContentSecurityPolicy::didCreateWindowShell): Deleted.
+        * page/csp/ContentSecurityPolicy.h:
+
 2017-06-13  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, fix typo in variable introduced in r218108.
index 69340cb..d3b5034 100644 (file)
                BCBB8ABA13F1AFB000734DF0 /* PODIntervalTree.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB613F1AFB000734DF0 /* PODIntervalTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCBB8ABB13F1AFB000734DF0 /* PODRedBlackTree.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB713F1AFB000734DF0 /* PODRedBlackTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCBD21AB0E417AD400A070F2 /* URLHash.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBD21AA0E417AD400A070F2 /* URLHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               BCBFB53C0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp */; };
-               BCBFB53D0DCD29CF0019B3E5 /* JSDOMWindowShell.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowShell.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               BCBFB53C0DCD29CF0019B3E5 /* JSDOMWindowProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowProxy.cpp */; };
+               BCBFB53D0DCD29CF0019B3E5 /* JSDOMWindowProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowProxy.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCC0E8751BFE70E9008F7F50 /* HTMLPictureElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC0E8731BFE70E9008F7F50 /* HTMLPictureElement.cpp */; };
                BCC0E8761BFE70E9008F7F50 /* HTMLPictureElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC0E8741BFE70E9008F7F50 /* HTMLPictureElement.h */; };
                BCC5BE000C0E93110011C2DB /* JSCSSStyleSheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC5BDFE0C0E93110011C2DB /* JSCSSStyleSheet.cpp */; };
                BCBB8AB613F1AFB000734DF0 /* PODIntervalTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODIntervalTree.h; sourceTree = "<group>"; };
                BCBB8AB713F1AFB000734DF0 /* PODRedBlackTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODRedBlackTree.h; sourceTree = "<group>"; };
                BCBD21AA0E417AD400A070F2 /* URLHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLHash.h; sourceTree = "<group>"; };
-               BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWindowShell.cpp; sourceTree = "<group>"; };
-               BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowShell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMWindowShell.h; sourceTree = "<group>"; };
+               BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWindowProxy.cpp; sourceTree = "<group>"; };
+               BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMWindowProxy.h; sourceTree = "<group>"; };
                BCC0E8731BFE70E9008F7F50 /* HTMLPictureElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPictureElement.cpp; sourceTree = "<group>"; };
                BCC0E8741BFE70E9008F7F50 /* HTMLPictureElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLPictureElement.h; sourceTree = "<group>"; };
                BCC5BDFE0C0E93110011C2DB /* JSCSSStyleSheet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSStyleSheet.cpp; sourceTree = "<group>"; };
                                BC6932720D7E293900AE44D1 /* JSDOMWindowBase.h */,
                                460CBF331D4BCCFE0092E88E /* JSDOMWindowProperties.cpp */,
                                460CBF341D4BCCFE0092E88E /* JSDOMWindowProperties.h */,
-                               BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp */,
-                               BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowShell.h */,
+                               BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowProxy.cpp */,
+                               BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowProxy.h */,
                                4170A2E91D8C0CC000318452 /* JSDOMWrapper.cpp */,
                                65E0E9431133C89F00B4CB10 /* JSDOMWrapper.h */,
                                7C45C9CB1E3E8E4900AAB558 /* JSDOMWrapperCache.cpp */,
                                BC6932740D7E293900AE44D1 /* JSDOMWindowBase.h in Headers */,
                                652FBBBC0DE27CB60001D386 /* JSDOMWindowCustom.h in Headers */,
                                460CBF361D4BCD0E0092E88E /* JSDOMWindowProperties.h in Headers */,
-                               BCBFB53D0DCD29CF0019B3E5 /* JSDOMWindowShell.h in Headers */,
+                               BCBFB53D0DCD29CF0019B3E5 /* JSDOMWindowProxy.h in Headers */,
                                65E0E9441133C89F00B4CB10 /* JSDOMWrapper.h in Headers */,
                                7C45C9D31E3FCBD700AAB558 /* JSDOMWrapperCache.h in Headers */,
                                93A8061E1E03B585008A1F26 /* JSDoubleRange.h in Headers */,
                                BC6932730D7E293900AE44D1 /* JSDOMWindowBase.cpp in Sources */,
                                BCD9C2620C17AA67005C90A2 /* JSDOMWindowCustom.cpp in Sources */,
                                460CBF351D4BCD0E0092E88E /* JSDOMWindowProperties.cpp in Sources */,
-                               BCBFB53C0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp in Sources */,
+                               BCBFB53C0DCD29CF0019B3E5 /* JSDOMWindowProxy.cpp in Sources */,
                                4170A2EA1D8C0CCA00318452 /* JSDOMWrapper.cpp in Sources */,
                                7C45C9D01E3EFDFB00AAB558 /* JSDOMWrapperCache.cpp in Sources */,
                                93A8061D1E03B585008A1F26 /* JSDoubleRange.cpp in Sources */,
index 1187bc1..02c77ca 100644 (file)
@@ -47,8 +47,8 @@ DOMWrapperWorld::~DOMWrapperWorld()
     static_cast<JSVMClientData*>(clientData)->forgetWorld(*this);
 
     // These items are created lazily.
-    while (!m_scriptControllersWithWindowShells.isEmpty())
-        (*m_scriptControllersWithWindowShells.begin())->destroyWindowShell(*this);
+    while (!m_scriptControllersWithWindowProxies.isEmpty())
+        (*m_scriptControllersWithWindowProxies.begin())->destroyWindowProxy(*this);
 }
 
 void DOMWrapperWorld::clearWrappers()
@@ -56,8 +56,8 @@ void DOMWrapperWorld::clearWrappers()
     m_wrappers.clear();
 
     // These items are created lazily.
-    while (!m_scriptControllersWithWindowShells.isEmpty())
-        (*m_scriptControllersWithWindowShells.begin())->destroyWindowShell(*this);
+    while (!m_scriptControllersWithWindowProxies.isEmpty())
+        (*m_scriptControllersWithWindowProxies.begin())->destroyWindowProxy(*this);
 }
 
 DOMWrapperWorld& normalWorld(JSC::VM& vm)
index 6eaec10..2207a84 100644 (file)
@@ -42,8 +42,8 @@ public:
     // Free as much memory held onto by this world as possible.
     WEBCORE_EXPORT void clearWrappers();
 
-    void didCreateWindowShell(ScriptController* scriptController) { m_scriptControllersWithWindowShells.add(scriptController); }
-    void didDestroyWindowShell(ScriptController* scriptController) { m_scriptControllersWithWindowShells.remove(scriptController); }
+    void didCreateWindowProxy(ScriptController* scriptController) { m_scriptControllersWithWindowProxies.add(scriptController); }
+    void didDestroyWindowProxy(ScriptController* scriptController) { m_scriptControllersWithWindowProxies.remove(scriptController); }
 
     void setShadowRootIsAlwaysOpen() { m_shadowRootIsAlwaysOpen = true; }
     bool shadowRootIsAlwaysOpen() const { return m_shadowRootIsAlwaysOpen; }
@@ -61,7 +61,7 @@ protected:
 
 private:
     JSC::VM& m_vm;
-    HashSet<ScriptController*> m_scriptControllersWithWindowShells;
+    HashSet<ScriptController*> m_scriptControllersWithWindowProxies;
     bool m_isNormal;
     bool m_shadowRootIsAlwaysOpen { false };
 };
index ea953b3..c536762 100644 (file)
@@ -54,7 +54,7 @@
 #include "JSDOMWindowBase.cpp"
 #include "JSDOMWindowCustom.cpp"
 #include "JSDOMWindowProperties.cpp"
-#include "JSDOMWindowShell.cpp"
+#include "JSDOMWindowProxy.cpp"
 #include "JSDOMWrapper.cpp"
 #include "JSDOMWrapperCache.cpp"
 #include "JSDocumentCustom.cpp"
index 6dc51da..aa5e1c9 100644 (file)
@@ -77,22 +77,22 @@ const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = {
     &defaultLanguage
 };
 
-JSDOMWindowBase::JSDOMWindowBase(VM& vm, Structure* structure, RefPtr<DOMWindow>&& window, JSDOMWindowShell* shell)
-    : JSDOMGlobalObject(vm, structure, shell->world(), &s_globalObjectMethodTable)
+JSDOMWindowBase::JSDOMWindowBase(VM& vm, Structure* structure, RefPtr<DOMWindow>&& window, JSDOMWindowProxy* proxy)
+    : JSDOMGlobalObject(vm, structure, proxy->world(), &s_globalObjectMethodTable)
     , m_windowCloseWatchpoints((window && window->frame()) ? IsWatched : IsInvalidated)
     , m_wrapped(WTFMove(window))
-    , m_shell(shell)
+    , m_proxy(proxy)
 {
 }
 
-void JSDOMWindowBase::finishCreation(VM& vm, JSDOMWindowShell* shell)
+void JSDOMWindowBase::finishCreation(VM& vm, JSDOMWindowProxy* proxy)
 {
-    Base::finishCreation(vm, shell);
+    Base::finishCreation(vm, proxy);
     ASSERT(inherits(vm, info()));
 
     GlobalPropertyInfo staticGlobals[] = {
         GlobalPropertyInfo(vm.propertyNames->document, jsNull(), DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->window, m_shell, DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->window, m_proxy, DontDelete | ReadOnly),
     };
 
     addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
@@ -235,14 +235,14 @@ void JSDOMWindowBase::queueTaskToEventLoop(JSGlobalObject& object, Ref<JSC::Micr
     MicrotaskQueue::mainThreadQueue().append(WTFMove(microtask));
 }
 
-void JSDOMWindowBase::willRemoveFromWindowShell()
+void JSDOMWindowBase::willRemoveFromWindowProxy()
 {
     setCurrentEvent(0);
 }
 
-JSDOMWindowShell* JSDOMWindowBase::shell() const
+JSDOMWindowProxy* JSDOMWindowBase::proxy() const
 {
-    return m_shell;
+    return m_proxy;
 }
 
 // JSDOMGlobalObject* is ignored, accessing a window in any context will
@@ -264,7 +264,7 @@ JSValue toJS(ExecState* state, DOMWindow& domWindow)
 
 JSDOMWindow* toJSDOMWindow(Frame& frame, DOMWrapperWorld& world)
 {
-    return frame.script().windowShell(world)->window();
+    return frame.script().windowProxy(world)->window();
 }
 
 JSDOMWindow* toJSDOMWindow(JSC::VM& vm, JSValue value)
@@ -277,8 +277,8 @@ JSDOMWindow* toJSDOMWindow(JSC::VM& vm, JSValue value)
         const ClassInfo* classInfo = object->classInfo(vm);
         if (classInfo == JSDOMWindow::info())
             return jsCast<JSDOMWindow*>(object);
-        if (classInfo == JSDOMWindowShell::info())
-            return jsCast<JSDOMWindowShell*>(object)->window();
+        if (classInfo == JSDOMWindowProxy::info())
+            return jsCast<JSDOMWindowProxy*>(object)->window();
         value = object->getPrototypeDirect();
     }
     return nullptr;
index 5e897d7..d5ff703 100644 (file)
 
 namespace WebCore {
 
-    class DOMWindow;
-    class Frame;
-    class DOMWrapperWorld;
-    class JSDOMWindow;
-    class JSDOMWindowShell;
-
-    class JSDOMWindowBasePrivate;
-
-    class WEBCORE_EXPORT JSDOMWindowBase : public JSDOMGlobalObject {
-        typedef JSDOMGlobalObject Base;
-    protected:
-        JSDOMWindowBase(JSC::VM&, JSC::Structure*, RefPtr<DOMWindow>&&, JSDOMWindowShell*);
-        void finishCreation(JSC::VM&, JSDOMWindowShell*);
-
-        static void destroy(JSCell*);
-
-    public:
-        void updateDocument();
-
-        DOMWindow& wrapped() const { return *m_wrapped; }
-        ScriptExecutionContext* scriptExecutionContext() const;
-
-        // Called just before removing this window from the JSDOMWindowShell.
-        void willRemoveFromWindowShell();
-
-        DECLARE_INFO;
-
-        static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSValue prototype)
-        {
-            return JSC::Structure::create(vm, 0, prototype, JSC::TypeInfo(JSC::GlobalObjectType, StructureFlags), info());
-        }
-
-        static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable;
-
-        static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
-        static bool shouldInterruptScript(const JSC::JSGlobalObject*);
-        static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
-        static JSC::RuntimeFlags javaScriptRuntimeFlags(const JSC::JSGlobalObject*);
-        static void queueTaskToEventLoop(JSC::JSGlobalObject&, Ref<JSC::Microtask>&&);
-        
-        void printErrorMessage(const String&) const;
-
-        JSDOMWindowShell* shell() const;
-
-        static void fireFrameClearedWatchpointsForWindow(DOMWindow*);
-
-    protected:
-        JSC::WatchpointSet m_windowCloseWatchpoints;
-
-    private:
-        static JSC::JSInternalPromise* moduleLoaderResolve(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue, JSC::JSValue);
-        static JSC::JSInternalPromise* moduleLoaderFetch(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue);
-        static JSC::JSValue moduleLoaderEvaluate(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue, JSC::JSValue);
-        static JSC::JSInternalPromise* moduleLoaderImportModule(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSString*, const JSC::SourceOrigin&);
-        static void promiseRejectionTracker(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSPromise*, JSC::JSPromiseRejectionOperation);
-
-        RefPtr<DOMWindow> m_wrapped;
-        JSDOMWindowShell* m_shell;
-    };
-
-    // The following return a JSDOMWindowShell or jsNull()
-    // JSDOMGlobalObject* is ignored, accessing a window in any context will use that DOMWindow's prototype chain.
-    WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMWindow&);
-    inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, DOMWindow* window) { return window ? toJS(state, globalObject, *window) : JSC::jsNull(); }
-    JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Frame&);
-    inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, Frame* frame) { return frame ? toJS(state, globalObject, *frame) : JSC::jsNull(); }
-    JSC::JSValue toJS(JSC::ExecState*, DOMWindow&);
-    inline JSC::JSValue toJS(JSC::ExecState* state, DOMWindow* window) { return window ? toJS(state, *window) : JSC::jsNull(); }
-
-    // The following return a JSDOMWindow or nullptr.
-    JSDOMWindow* toJSDOMWindow(Frame&, DOMWrapperWorld&);
-    inline JSDOMWindow* toJSDOMWindow(Frame* frame, DOMWrapperWorld& world) { return frame ? toJSDOMWindow(*frame, world) : nullptr; }
-    WEBCORE_EXPORT JSDOMWindow* toJSDOMWindow(JSC::VM&, JSC::JSValue);
-
-    // DOMWindow associated with global object of the "most-recently-entered author function or script
-    // on the stack, or the author function or script that originally scheduled the currently-running callback."
-    // (<https://html.spec.whatwg.org/multipage/webappapis.html#concept-incumbent-everything>, 27 April 2017)
-    // FIXME: Make this work for an "author function or script that originally scheduled the currently-running callback."
-    // See <https://bugs.webkit.org/show_bug.cgi?id=163412>.
-    DOMWindow& incumbentDOMWindow(JSC::ExecState*);
-
-    DOMWindow& activeDOMWindow(JSC::ExecState*);
-    DOMWindow& firstDOMWindow(JSC::ExecState*);
+class DOMWindow;
+class Frame;
+class DOMWrapperWorld;
+class JSDOMWindow;
+class JSDOMWindowProxy;
+
+class JSDOMWindowBasePrivate;
+
+class WEBCORE_EXPORT JSDOMWindowBase : public JSDOMGlobalObject {
+    typedef JSDOMGlobalObject Base;
+protected:
+    JSDOMWindowBase(JSC::VM&, JSC::Structure*, RefPtr<DOMWindow>&&, JSDOMWindowProxy*);
+    void finishCreation(JSC::VM&, JSDOMWindowProxy*);
+
+    static void destroy(JSCell*);
+
+public:
+    void updateDocument();
+
+    DOMWindow& wrapped() const { return *m_wrapped; }
+    ScriptExecutionContext* scriptExecutionContext() const;
+
+    // Called just before removing this window from the JSDOMWindowProxy.
+    void willRemoveFromWindowProxy();
+
+    DECLARE_INFO;
+
+    static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(vm, 0, prototype, JSC::TypeInfo(JSC::GlobalObjectType, StructureFlags), info());
+    }
+
+    static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable;
+
+    static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
+    static bool shouldInterruptScript(const JSC::JSGlobalObject*);
+    static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
+    static JSC::RuntimeFlags javaScriptRuntimeFlags(const JSC::JSGlobalObject*);
+    static void queueTaskToEventLoop(JSC::JSGlobalObject&, Ref<JSC::Microtask>&&);
+
+    void printErrorMessage(const String&) const;
+
+    JSDOMWindowProxy* proxy() const;
+
+    static void fireFrameClearedWatchpointsForWindow(DOMWindow*);
+
+protected:
+    JSC::WatchpointSet m_windowCloseWatchpoints;
+
+private:
+    static JSC::JSInternalPromise* moduleLoaderResolve(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue, JSC::JSValue);
+    static JSC::JSInternalPromise* moduleLoaderFetch(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue);
+    static JSC::JSValue moduleLoaderEvaluate(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue, JSC::JSValue);
+    static JSC::JSInternalPromise* moduleLoaderImportModule(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSString*, const JSC::SourceOrigin&);
+    static void promiseRejectionTracker(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSPromise*, JSC::JSPromiseRejectionOperation);
+
+    RefPtr<DOMWindow> m_wrapped;
+    JSDOMWindowProxy* m_proxy;
+};
+
+// The following return a JSDOMWindowProxy or jsNull()
+// JSDOMGlobalObject* is ignored, accessing a window in any context will use that DOMWindow's prototype chain.
+WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMWindow&);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, DOMWindow* window) { return window ? toJS(state, globalObject, *window) : JSC::jsNull(); }
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Frame&);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, Frame* frame) { return frame ? toJS(state, globalObject, *frame) : JSC::jsNull(); }
+JSC::JSValue toJS(JSC::ExecState*, DOMWindow&);
+inline JSC::JSValue toJS(JSC::ExecState* state, DOMWindow* window) { return window ? toJS(state, *window) : JSC::jsNull(); }
+
+// The following return a JSDOMWindow or nullptr.
+JSDOMWindow* toJSDOMWindow(Frame&, DOMWrapperWorld&);
+inline JSDOMWindow* toJSDOMWindow(Frame* frame, DOMWrapperWorld& world) { return frame ? toJSDOMWindow(*frame, world) : nullptr; }
+WEBCORE_EXPORT JSDOMWindow* toJSDOMWindow(JSC::VM&, JSC::JSValue);
+
+// DOMWindow associated with global object of the "most-recently-entered author function or script
+// on the stack, or the author function or script that originally scheduled the currently-running callback."
+// (<https://html.spec.whatwg.org/multipage/webappapis.html#concept-incumbent-everything>, 27 April 2017)
+// FIXME: Make this work for an "author function or script that originally scheduled the currently-running callback."
+// See <https://bugs.webkit.org/show_bug.cgi?id=163412>.
+DOMWindow& incumbentDOMWindow(JSC::ExecState*);
+
+DOMWindow& activeDOMWindow(JSC::ExecState*);
+DOMWindow& firstDOMWindow(JSC::ExecState*);
 
 } // namespace WebCore
index 6c94b99..9a48bee 100644 (file)
@@ -565,8 +565,8 @@ DOMWindow* JSDOMWindow::toWrapped(VM& vm, JSValue value)
     JSObject* object = asObject(value);
     if (object->inherits(vm, JSDOMWindow::info()))
         return &jsCast<JSDOMWindow*>(object)->wrapped();
-    if (object->inherits(vm, JSDOMWindowShell::info()))
-        return &jsCast<JSDOMWindowShell*>(object)->wrapped();
+    if (object->inherits(vm, JSDOMWindowProxy::info()))
+        return &jsCast<JSDOMWindowProxy*>(object)->wrapped();
     return nullptr;
 }
 
index ab629d6..58d9505 100644 (file)
@@ -19,7 +19,7 @@
 #pragma once
 
 #include "JSDOMWindow.h"
-#include "JSDOMWindowShell.h"
+#include "JSDOMWindowProxy.h"
 
 namespace WebCore {
 
index a3c47de..cf7e92d 100644 (file)
@@ -55,7 +55,8 @@ public:
 protected:
     JSDOMWindowProperties(JSC::Structure* structure, JSC::JSGlobalObject& globalObject)
         : JSDOMObject(structure, globalObject)
-    { }
+    {
+    }
 };
 
 } // namespace WebCore
@@ -27,7 +27,7 @@
  */
 
 #include "config.h"
-#include "JSDOMWindowShell.h"
+#include "JSDOMWindowProxy.h"
 
 #include "CommonVM.h"
 #include "Frame.h"
@@ -43,27 +43,27 @@ using namespace JSC;
 
 namespace WebCore {
 
-const ClassInfo JSDOMWindowShell::s_info = { "JSDOMWindowShell", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDOMWindowShell) };
+const ClassInfo JSDOMWindowProxy::s_info = { "JSDOMWindowProxy", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDOMWindowProxy) };
 
-JSDOMWindowShell::JSDOMWindowShell(VM& vm, Structure* structure, DOMWrapperWorld& world)
+JSDOMWindowProxy::JSDOMWindowProxy(VM& vm, Structure* structure, DOMWrapperWorld& world)
     : Base(vm, structure)
     , m_world(world)
 {
 }
 
-void JSDOMWindowShell::finishCreation(VM& vm, RefPtr<DOMWindow>&& window)
+void JSDOMWindowProxy::finishCreation(VM& vm, RefPtr<DOMWindow>&& window)
 {
     Base::finishCreation(vm);
     ASSERT(inherits(vm, info()));
     setWindow(WTFMove(window));
 }
 
-void JSDOMWindowShell::destroy(JSCell* cell)
+void JSDOMWindowProxy::destroy(JSCell* cell)
 {
-    static_cast<JSDOMWindowShell*>(cell)->JSDOMWindowShell::~JSDOMWindowShell();
+    static_cast<JSDOMWindowProxy*>(cell)->JSDOMWindowProxy::~JSDOMWindowProxy();
 }
 
-void JSDOMWindowShell::setWindow(VM& vm, JSDOMWindow* window)
+void JSDOMWindowProxy::setWindow(VM& vm, JSDOMWindow* window)
 {
     ASSERT_ARG(window, window);
     setTarget(vm, window);
@@ -71,9 +71,9 @@ void JSDOMWindowShell::setWindow(VM& vm, JSDOMWindow* window)
     GCController::singleton().garbageCollectSoon();
 }
 
-void JSDOMWindowShell::setWindow(RefPtr<DOMWindow>&& domWindow)
+void JSDOMWindowProxy::setWindow(RefPtr<DOMWindow>&& domWindow)
 {
-    // Replacing JSDOMWindow via telling JSDOMWindowShell to use the same DOMWindow it already uses makes no sense,
+    // Replacing JSDOMWindow via telling JSDOMWindowProxy to use the same DOMWindow it already uses makes no sense,
     // so we'd better never try to.
     ASSERT(!window() || domWindow.get() != &window()->wrapped());
     // Explicitly protect the global object's prototype so it isn't collected
@@ -101,14 +101,14 @@ void JSDOMWindowShell::setWindow(RefPtr<DOMWindow>&& domWindow)
 // JSDOMWindow methods
 // ----
 
-DOMWindow& JSDOMWindowShell::wrapped() const
+DOMWindow& JSDOMWindowProxy::wrapped() const
 {
     return window()->wrapped();
 }
 
-DOMWindow* JSDOMWindowShell::toWrapped(VM& vm, JSObject* value)
+DOMWindow* JSDOMWindowProxy::toWrapped(VM& vm, JSObject* value)
 {
-    auto* wrapper = jsDynamicDowncast<JSDOMWindowShell*>(vm, value);
+    auto* wrapper = jsDynamicDowncast<JSDOMWindowProxy*>(vm, value);
     if (!wrapper)
         return nullptr;
     return &wrapper->window()->wrapped();
@@ -120,12 +120,12 @@ DOMWindow* JSDOMWindowShell::toWrapped(VM& vm, JSObject* value)
 
 JSValue toJS(ExecState* exec, Frame& frame)
 {
-    return frame.script().windowShell(currentWorld(exec));
+    return frame.script().windowProxy(currentWorld(exec));
 }
 
-JSDOMWindowShell* toJSDOMWindowShell(Frame& frame, DOMWrapperWorld& world)
+JSDOMWindowProxy* toJSDOMWindowProxy(Frame& frame, DOMWrapperWorld& world)
 {
-    return frame.script().windowShell(world);
+    return frame.script().windowProxy(world);
 }
 
 } // namespace WebCore
@@ -36,8 +36,7 @@ namespace WebCore {
 
 class Frame;
 
-// FIXME: Rename to JSDOMWindowProxy or JSWindowProxy to match HTML spec naming. (https://webkit.org/b/80733)
-class JSDOMWindowShell : public JSC::JSProxy {
+class JSDOMWindowProxy : public JSC::JSProxy {
     typedef JSC::JSProxy Base;
 public:
     static void destroy(JSCell*);
@@ -51,11 +50,11 @@ public:
     DOMWindow& wrapped() const;
     static WEBCORE_EXPORT DOMWindow* toWrapped(JSC::VM&, JSC::JSObject*);
 
-    static JSDOMWindowShell* create(JSC::VM& vm, RefPtr<DOMWindow>&& window, JSC::Structure* structure, DOMWrapperWorld& world)
+    static JSDOMWindowProxy* create(JSC::VM& vm, RefPtr<DOMWindow>&& window, JSC::Structure* structure, DOMWrapperWorld& world)
     {
-        JSDOMWindowShell* shell = new (NotNull, JSC::allocateCell<JSDOMWindowShell>(vm.heap)) JSDOMWindowShell(vm, structure, world);
-        shell->finishCreation(vm, WTFMove(window));
-        return shell;
+        JSDOMWindowProxy* proxy = new (NotNull, JSC::allocateCell<JSDOMWindowProxy>(vm.heap)) JSDOMWindowProxy(vm, structure, world);
+        proxy->finishCreation(vm, WTFMove(window));
+        return proxy;
     }
 
     static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSValue prototype)
@@ -66,19 +65,19 @@ public:
     DOMWrapperWorld& world() { return m_world; }
 
 protected:
-    JSDOMWindowShell(JSC::VM&, JSC::Structure*, DOMWrapperWorld&);
+    JSDOMWindowProxy(JSC::VM&, JSC::Structure*, DOMWrapperWorld&);
     void finishCreation(JSC::VM&, RefPtr<DOMWindow>&&);
 
     Ref<DOMWrapperWorld> m_world;
 };
 
-// JSDOMWindowShell is a little odd in that it's not a traditional wrapper and has no back pointer. It
-// is however strongly owned by Frame (via its ScriptController), and therefore, to get the JSDOMWindowShell
+// JSDOMWindowProxy is a little odd in that it's not a traditional wrapper and has no back pointer. It
+// is however strongly owned by Frame (via its ScriptController), and therefore, to get the JSDOMWindowProxy
 // a Frame is passed.
 JSC::JSValue toJS(JSC::ExecState*, Frame&);
 inline JSC::JSValue toJS(JSC::ExecState* state, Frame* frame) { return frame ? toJS(state, *frame) : JSC::jsNull(); }
 
-JSDOMWindowShell* toJSDOMWindowShell(Frame&, DOMWrapperWorld&);
-inline JSDOMWindowShell* toJSDOMWindowShell(Frame* frame, DOMWrapperWorld& world) { return frame ? toJSDOMWindowShell(*frame, world) : nullptr; }
+JSDOMWindowProxy* toJSDOMWindowProxy(Frame&, DOMWrapperWorld&);
+inline JSDOMWindowProxy* toJSDOMWindowProxy(Frame* frame, DOMWrapperWorld& world) { return frame ? toJSDOMWindowProxy(*frame, world) : nullptr; }
 
 } // namespace WebCore
index 07b4689..1930d3e 100644 (file)
@@ -31,7 +31,7 @@
 #include "EventTargetHeaders.h"
 #include "EventTargetInterfaces.h"
 #include "JSDOMWindow.h"
-#include "JSDOMWindowShell.h"
+#include "JSDOMWindowProxy.h"
 #include "JSEventListener.h"
 #include "JSWorkerGlobalScope.h"
 #include "WorkerGlobalScope.h"
@@ -62,7 +62,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget& targ
 
 EventTarget* JSEventTarget::toWrapped(VM& vm, JSValue value)
 {
-    TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindowShell)
+    TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindowProxy)
     TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindow)
     TRY_TO_UNWRAP_WITH_INTERFACE(WorkerGlobalScope)
     TRY_TO_UNWRAP_WITH_INTERFACE(EventTarget)
index 7a5b121..77f808c 100644 (file)
@@ -116,7 +116,7 @@ JSValue JSHTMLDocument::open(ExecState& state)
     // For compatibility with other browsers, pass open calls with more than 2 parameters to the window.
     if (state.argumentCount() > 2) {
         if (auto* frame = wrapped().frame()) {
-            if (auto* wrapper = toJSDOMWindowShell(frame, currentWorld(&state))) {
+            if (auto* wrapper = toJSDOMWindowProxy(frame, currentWorld(&state))) {
                 auto function = wrapper->get(&state, Identifier::fromString(&state, "open"));
                 CallData callData;
                 auto callType = ::getCallData(function, callData);
index 8e1b940..d144796 100644 (file)
@@ -123,7 +123,7 @@ void ScheduledAction::execute(Document& document)
         return;
 
     if (m_function)
-        executeFunctionInContext(window, window->shell(), document);
+        executeFunctionInContext(window, window->proxy(), document);
     else
         frame->script().executeScriptInWorld(m_isolatedWorld, m_code);
 }
index 1196db7..5a20ee7 100644 (file)
@@ -52,13 +52,11 @@ ScriptCachedFrameData::ScriptCachedFrameData(Frame& frame)
 {
     JSLockHolder lock(commonVM());
 
-    ScriptController& scriptController = frame.script();
-    Vector<JSC::Strong<JSDOMWindowShell>> windowShells = scriptController.windowShells();
+    auto& scriptController = frame.script();
 
-    for (size_t i = 0; i < windowShells.size(); ++i) {
-        JSDOMWindowShell* windowShell = windowShells[i].get();
-        JSDOMWindow* window = windowShell->window();
-        m_windows.add(&windowShell->world(), Strong<JSDOMWindow>(window->vm(), window));
+    for (auto windowProxy : scriptController.windowProxies()) {
+        auto* window = windowProxy->window();
+        m_windows.add(&windowProxy->world(), Strong<JSDOMWindow>(window->vm(), window));
         window->setConsoleClient(nullptr);
     }
 
@@ -75,30 +73,28 @@ void ScriptCachedFrameData::restore(Frame& frame)
     JSLockHolder lock(commonVM());
 
     Page* page = frame.page();
-    ScriptController& scriptController = frame.script();
-    Vector<JSC::Strong<JSDOMWindowShell>> windowShells = scriptController.windowShells();
+    auto& scriptController = frame.script();
 
-    for (size_t i = 0; i < windowShells.size(); ++i) {
-        JSDOMWindowShell* windowShell = windowShells[i].get();
-        DOMWrapperWorld* world = &windowShell->world();
+    for (auto windowProxy : scriptController.windowProxies()) {
+        auto* world = &windowProxy->world();
 
-        if (JSDOMWindow* window = m_windows.get(world).get())
-            windowShell->setWindow(window->vm(), window);
+        if (auto* window = m_windows.get(world).get())
+            windowProxy->setWindow(window->vm(), window);
         else {
-            DOMWindow* domWindow = frame.document()->domWindow();
-            if (&windowShell->window()->wrapped() == domWindow)
+            auto* domWindow = frame.document()->domWindow();
+            if (&windowProxy->window()->wrapped() == domWindow)
                 continue;
 
-            windowShell->setWindow(domWindow);
+            windowProxy->setWindow(domWindow);
 
             if (page) {
-                scriptController.attachDebugger(windowShell, page->debugger());
-                windowShell->window()->setProfileGroup(page->group().identifier());
+                scriptController.attachDebugger(windowProxy.get(), page->debugger());
+                windowProxy->window()->setProfileGroup(page->group().identifier());
             }
         }
 
         if (page)
-            windowShell->window()->setConsoleClient(&page->console());
+            windowProxy->window()->setConsoleClient(&page->console());
     }
 }
 
index 5110e6c..f8b9e1b 100644 (file)
@@ -71,7 +71,7 @@ using namespace JSC;
 
 namespace WebCore {
 
-static void collectGarbageAfterWindowShellDestruction()
+static void collectGarbageAfterWindowProxyDestruction()
 {
     // Make sure to GC Extra Soon(tm) during memory pressure conditions
     // to soften high peaks of memory usage during navigation.
@@ -114,36 +114,36 @@ ScriptController::~ScriptController()
         m_cacheableBindingRootObject = nullptr;
     }
 
-    // It's likely that destroying m_windowShells will create a lot of garbage.
-    if (!m_windowShells.isEmpty()) {
-        while (!m_windowShells.isEmpty()) {
-            ShellMap::iterator iter = m_windowShells.begin();
+    // It's likely that destroying m_windowProxies will create a lot of garbage.
+    if (!m_windowProxies.isEmpty()) {
+        while (!m_windowProxies.isEmpty()) {
+            auto iter = m_windowProxies.begin();
             iter->value->window()->setConsoleClient(nullptr);
-            destroyWindowShell(*iter->key);
+            destroyWindowProxy(*iter->key);
         }
-        collectGarbageAfterWindowShellDestruction();
+        collectGarbageAfterWindowProxyDestruction();
     }
 }
 
-void ScriptController::destroyWindowShell(DOMWrapperWorld& world)
+void ScriptController::destroyWindowProxy(DOMWrapperWorld& world)
 {
-    ASSERT(m_windowShells.contains(&world));
-    m_windowShells.remove(&world);
-    world.didDestroyWindowShell(this);
+    ASSERT(m_windowProxies.contains(&world));
+    m_windowProxies.remove(&world);
+    world.didDestroyWindowProxy(this);
 }
 
-JSDOMWindowShell& ScriptController::createWindowShell(DOMWrapperWorld& world)
+JSDOMWindowProxy& ScriptController::createWindowProxy(DOMWrapperWorld& world)
 {
-    ASSERT(!m_windowShells.contains(&world));
+    ASSERT(!m_windowProxies.contains(&world));
 
     VM& vm = world.vm();
 
-    Structure* structure = JSDOMWindowShell::createStructure(vm, jsNull());
-    Strong<JSDOMWindowShell> windowShell(vm, JSDOMWindowShell::create(vm, m_frame.document()->domWindow(), structure, world));
-    Strong<JSDOMWindowShell> windowShell2(windowShell);
-    m_windowShells.add(&world, windowShell);
-    world.didCreateWindowShell(this);
-    return *windowShell.get();
+    auto* structure = JSDOMWindowProxy::createStructure(vm, jsNull());
+    Strong<JSDOMWindowProxy> windowProxy(vm, JSDOMWindowProxy::create(vm, m_frame.document()->domWindow(), structure, world));
+    Strong<JSDOMWindowProxy> windowProxy2(windowProxy);
+    m_windowProxies.add(&world, windowProxy);
+    world.didCreateWindowProxy(this);
+    return *windowProxy.get();
 }
 
 JSValue ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode, DOMWrapperWorld& world, ExceptionDetails* exceptionDetails)
@@ -160,8 +160,8 @@ JSValue ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode, DO
     // and false for <script>doSomething()</script>. Check if it has the
     // expected value in all cases.
     // See smart window.open policy for where this is used.
-    JSDOMWindowShell* shell = windowShell(world);
-    ExecState* exec = shell->window()->globalExec();
+    auto& proxy = *windowProxy(world);
+    auto& exec = *proxy.window()->globalExec();
     const String* savedSourceURL = m_sourceURL;
     m_sourceURL = &sourceURL;
 
@@ -170,12 +170,12 @@ JSValue ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode, DO
     InspectorInstrumentationCookie cookie = InspectorInstrumentation::willEvaluateScript(m_frame, sourceURL, sourceCode.startLine());
 
     NakedPtr<JSC::Exception> evaluationException;
-    JSValue returnValue = JSMainThreadExecState::profiledEvaluate(exec, JSC::ProfilingReason::Other, jsSourceCode, shell, evaluationException);
+    JSValue returnValue = JSMainThreadExecState::profiledEvaluate(&exec, JSC::ProfilingReason::Other, jsSourceCode, &proxy, evaluationException);
 
     InspectorInstrumentation::didEvaluateScript(cookie, m_frame);
 
     if (evaluationException) {
-        reportException(exec, evaluationException, sourceCode.cachedScript(), exceptionDetails);
+        reportException(&exec, evaluationException, sourceCode.cachedScript(), exceptionDetails);
         m_sourceURL = savedSourceURL;
         return { };
     }
@@ -193,8 +193,8 @@ void ScriptController::loadModuleScriptInWorld(LoadableModuleScript& moduleScrip
 {
     JSLockHolder lock(world.vm());
 
-    auto& shell = *windowShell(world);
-    auto& state = *shell.window()->globalExec();
+    auto& proxy = *windowProxy(world);
+    auto& state = *proxy.window()->globalExec();
 
     auto& promise = JSMainThreadExecState::loadModule(state, moduleName, JSC::JSScriptFetcher::create(state.vm(), { &moduleScript }));
     setupModuleScriptHandlers(moduleScript, promise, world);
@@ -209,8 +209,8 @@ void ScriptController::loadModuleScriptInWorld(LoadableModuleScript& moduleScrip
 {
     JSLockHolder lock(world.vm());
 
-    auto& shell = *windowShell(world);
-    auto& state = *shell.window()->globalExec();
+    auto& proxy = *windowProxy(world);
+    auto& state = *proxy.window()->globalExec();
 
     auto& promise = JSMainThreadExecState::loadModule(state, sourceCode.jsSourceCode(), JSC::JSScriptFetcher::create(state.vm(), { &moduleScript }));
     setupModuleScriptHandlers(moduleScript, promise, world);
@@ -225,8 +225,8 @@ JSC::JSValue ScriptController::linkAndEvaluateModuleScriptInWorld(LoadableModule
 {
     JSLockHolder lock(world.vm());
 
-    auto& shell = *windowShell(world);
-    auto& state = *shell.window()->globalExec();
+    auto& proxy = *windowProxy(world);
+    auto& state = *proxy.window()->globalExec();
 
     // FIXME: Preventing Frame from being destroyed is essentially unnecessary.
     // https://bugs.webkit.org/show_bug.cgi?id=164763
@@ -254,8 +254,8 @@ JSC::JSValue ScriptController::evaluateModule(const URL& sourceURL, JSModuleReco
 
     const auto& jsSourceCode = moduleRecord.sourceCode();
 
-    auto& shell = *windowShell(world);
-    auto& state = *shell.window()->globalExec();
+    auto& proxy = *windowProxy(world);
+    auto& state = *proxy.window()->globalExec();
     SetForScope<const String*> sourceURLScope(m_sourceURL, &sourceURL.string());
 
     Ref<Frame> protector(m_frame);
@@ -278,11 +278,11 @@ Ref<DOMWrapperWorld> ScriptController::createWorld()
     return DOMWrapperWorld::create(commonVM());
 }
 
-Vector<JSC::Strong<JSDOMWindowShell>> ScriptController::windowShells()
+Vector<JSC::Strong<JSDOMWindowProxy>> ScriptController::windowProxies()
 {
-    Vector<JSC::Strong<JSDOMWindowShell>> windowShells;
-    copyValuesToVector(m_windowShells, windowShells);
-    return windowShells;
+    Vector<JSC::Strong<JSDOMWindowProxy>> windowProxies;
+    copyValuesToVector(m_windowProxies, windowProxies);
+    return windowProxies;
 }
 
 void ScriptController::getAllWorlds(Vector<Ref<DOMWrapperWorld>>& worlds)
@@ -290,77 +290,77 @@ void ScriptController::getAllWorlds(Vector<Ref<DOMWrapperWorld>>& worlds)
     static_cast<JSVMClientData*>(commonVM().clientData)->getAllWorlds(worlds);
 }
 
-void ScriptController::clearWindowShellsNotMatchingDOMWindow(DOMWindow* newDOMWindow, bool goingIntoPageCache)
+void ScriptController::clearWindowProxiesNotMatchingDOMWindow(DOMWindow* newDOMWindow, bool goingIntoPageCache)
 {
-    if (m_windowShells.isEmpty())
+    if (m_windowProxies.isEmpty())
         return;
 
     JSLockHolder lock(commonVM());
 
-    for (auto& windowShell : windowShells()) {
-        if (&windowShell->window()->wrapped() == newDOMWindow)
+    for (auto& windowProxy : windowProxies()) {
+        if (&windowProxy->window()->wrapped() == newDOMWindow)
             continue;
 
         // Clear the debugger and console from the current window before setting the new window.
-        attachDebugger(windowShell.get(), nullptr);
-        windowShell->window()->setConsoleClient(nullptr);
-        windowShell->window()->willRemoveFromWindowShell();
+        attachDebugger(windowProxy.get(), nullptr);
+        windowProxy->window()->setConsoleClient(nullptr);
+        windowProxy->window()->willRemoveFromWindowProxy();
     }
 
     // It's likely that resetting our windows created a lot of garbage, unless
     // it went in a back/forward cache.
     if (!goingIntoPageCache)
-        collectGarbageAfterWindowShellDestruction();
+        collectGarbageAfterWindowProxyDestruction();
 }
 
-void ScriptController::setDOMWindowForWindowShell(DOMWindow* newDOMWindow)
+void ScriptController::setDOMWindowForWindowProxy(DOMWindow* newDOMWindow)
 {
-    if (m_windowShells.isEmpty())
+    if (m_windowProxies.isEmpty())
         return;
     
     JSLockHolder lock(commonVM());
     
-    for (auto& windowShell : windowShells()) {
-        if (&windowShell->window()->wrapped() == newDOMWindow)
+    for (auto& windowProxy : windowProxies()) {
+        if (&windowProxy->window()->wrapped() == newDOMWindow)
             continue;
         
-        windowShell->setWindow(newDOMWindow);
+        windowProxy->setWindow(newDOMWindow);
         
         // An m_cacheableBindingRootObject persists between page navigations
         // so needs to know about the new JSDOMWindow.
         if (m_cacheableBindingRootObject)
-            m_cacheableBindingRootObject->updateGlobalObject(windowShell->window());
+            m_cacheableBindingRootObject->updateGlobalObject(windowProxy->window());
 
         if (Page* page = m_frame.page()) {
-            attachDebugger(windowShell.get(), page->debugger());
-            windowShell->window()->setProfileGroup(page->group().identifier());
-            windowShell->window()->setConsoleClient(&page->console());
+            attachDebugger(windowProxy.get(), page->debugger());
+            windowProxy->window()->setProfileGroup(page->group().identifier());
+            windowProxy->window()->setConsoleClient(&page->console());
         }
     }
 }
 
-JSDOMWindowShell* ScriptController::initScript(DOMWrapperWorld& world)
+JSDOMWindowProxy* ScriptController::initScript(DOMWrapperWorld& world)
 {
-    ASSERT(!m_windowShells.contains(&world));
+    ASSERT(!m_windowProxies.contains(&world));
 
     JSLockHolder lock(world.vm());
 
-    JSDOMWindowShell& windowShell = createWindowShell(world);
+    auto& windowProxy = createWindowProxy(world);
 
-    windowShell.window()->updateDocument();
+    windowProxy.window()->updateDocument();
 
     if (Document* document = m_frame.document())
-        document->contentSecurityPolicy()->didCreateWindowShell(windowShell);
+        document->contentSecurityPolicy()->didCreateWindowProxy(windowProxy);
 
     if (Page* page = m_frame.page()) {
-        attachDebugger(&windowShell, page->debugger());
-        windowShell.window()->setProfileGroup(page->group().identifier());
-        windowShell.window()->setConsoleClient(&page->console());
+        attachDebugger(&windowProxy, page->debugger());
+        windowProxy.window()->setProfileGroup(page->group().identifier());
+        windowProxy.window()->setConsoleClient(&page->console());
     }
 
     m_frame.loader().dispatchDidClearWindowObjectInWorld(world);
 
-    return &windowShell;
+    return &windowProxy;
 }
 
 static Identifier jsValueToModuleKey(ExecState* exec, JSValue value)
@@ -373,8 +373,8 @@ static Identifier jsValueToModuleKey(ExecState* exec, JSValue value)
 
 void ScriptController::setupModuleScriptHandlers(LoadableModuleScript& moduleScriptRef, JSInternalPromise& promise, DOMWrapperWorld& world)
 {
-    auto& shell = *windowShell(world);
-    auto& state = *shell.window()->globalExec();
+    auto& proxy = *windowProxy(world);
+    auto& state = *proxy.window()->globalExec();
 
     // It is not guaranteed that either fulfillHandler or rejectHandler is eventually called.
     // For example, if the page load is canceled, the DeferredPromise used in the module loader pipeline will stop executing JS code.
@@ -382,13 +382,13 @@ void ScriptController::setupModuleScriptHandlers(LoadableModuleScript& moduleScr
 
     RefPtr<LoadableModuleScript> moduleScript(&moduleScriptRef);
 
-    auto& fulfillHandler = *JSNativeStdFunction::create(state.vm(), shell.window(), 1, String(), [moduleScript](ExecState* exec) {
+    auto& fulfillHandler = *JSNativeStdFunction::create(state.vm(), proxy.window(), 1, String(), [moduleScript](ExecState* exec) {
         Identifier moduleKey = jsValueToModuleKey(exec, exec->argument(0));
         moduleScript->notifyLoadCompleted(*moduleKey.impl());
         return JSValue::encode(jsUndefined());
     });
 
-    auto& rejectHandler = *JSNativeStdFunction::create(state.vm(), shell.window(), 1, String(), [moduleScript](ExecState* exec) {
+    auto& rejectHandler = *JSNativeStdFunction::create(state.vm(), proxy.window(), 1, String(), [moduleScript](ExecState* exec) {
         VM& vm = exec->vm();
         JSValue errorValue = exec->argument(0);
         if (errorValue.isObject()) {
@@ -432,7 +432,7 @@ TextPosition ScriptController::eventHandlerPosition() const
 
     // FIXME: This location maps to the end of the HTML tag, and not to the
     // exact column number belonging to the event handler attribute.
-    ScriptableDocumentParser* parser = m_frame.document()->scriptableDocumentParser();
+    auto* parser = m_frame.document()->scriptableDocumentParser();
     if (parser)
         return parser->textPosition();
     return TextPosition();
@@ -440,18 +440,18 @@ TextPosition ScriptController::eventHandlerPosition() const
 
 void ScriptController::enableEval()
 {
-    JSDOMWindowShell* windowShell = existingWindowShell(mainThreadNormalWorld());
-    if (!windowShell)
+    auto* windowProxy = existingWindowProxy(mainThreadNormalWorld());
+    if (!windowProxy)
         return;
-    windowShell->window()->setEvalEnabled(true);
+    windowProxy->window()->setEvalEnabled(true);
 }
 
 void ScriptController::disableEval(const String& errorMessage)
 {
-    JSDOMWindowShell* windowShell = existingWindowShell(mainThreadNormalWorld());
-    if (!windowShell)
+    auto* windowProxy = existingWindowProxy(mainThreadNormalWorld());
+    if (!windowProxy)
         return;
-    windowShell->window()->setEvalEnabled(false, errorMessage);
+    windowProxy->window()->setEvalEnabled(false, errorMessage);
 }
 
 bool ScriptController::processingUserGesture()
@@ -466,7 +466,7 @@ bool ScriptController::processingUserGestureForMedia()
 
 bool ScriptController::canAccessFromCurrentOrigin(Frame* frame)
 {
-    ExecState* state = JSMainThreadExecState::currentState();
+    auto* state = JSMainThreadExecState::currentState();
 
     // If the current state is null we're in a call path where the DOM security check doesn't apply (eg. parser).
     if (!state)
@@ -477,42 +477,40 @@ bool ScriptController::canAccessFromCurrentOrigin(Frame* frame)
 
 void ScriptController::attachDebugger(JSC::Debugger* debugger)
 {
-    Vector<JSC::Strong<JSDOMWindowShell>> windowShells = this->windowShells();
-    for (size_t i = 0; i < windowShells.size(); ++i)
-        attachDebugger(windowShells[i].get(), debugger);
+    for (auto& windowProxy : windowProxies())
+        attachDebugger(windowProxy.get(), debugger);
 }
 
-void ScriptController::attachDebugger(JSDOMWindowShell* shell, JSC::Debugger* debugger)
+void ScriptController::attachDebugger(JSDOMWindowProxy* proxy, JSC::Debugger* debugger)
 {
-    if (!shell)
+    if (!proxy)
         return;
 
-    JSDOMWindow* globalObject = shell->window();
+    auto* globalObject = proxy->window();
     JSLockHolder lock(globalObject->vm());
+
     if (debugger)
         debugger->attach(globalObject);
-    else if (JSC::Debugger* currentDebugger = globalObject->debugger())
+    else if (auto* currentDebugger = globalObject->debugger())
         currentDebugger->detach(globalObject, JSC::Debugger::TerminatingDebuggingSession);
 }
 
 void ScriptController::updateDocument()
 {
-    Vector<JSC::Strong<JSDOMWindowShell>> windowShells = this->windowShells();
-    for (size_t i = 0; i < windowShells.size(); ++i) {
-        JSDOMWindowShell* windowShell = windowShells[i].get();
-        JSLockHolder lock(windowShell->world().vm());
-        windowShell->window()->updateDocument();
+    for (auto& windowProxy : windowProxies()) {
+        JSLockHolder lock(windowProxy->world().vm());
+        windowProxy->window()->updateDocument();
     }
 }
 
 Bindings::RootObject* ScriptController::cacheableBindingRootObject()
 {
     if (!canExecuteScripts(NotAboutToExecuteScript))
-        return 0;
+        return nullptr;
 
     if (!m_cacheableBindingRootObject) {
         JSLockHolder lock(commonVM());
-        m_cacheableBindingRootObject = Bindings::RootObject::create(0, globalObject(pluginWorld()));
+        m_cacheableBindingRootObject = Bindings::RootObject::create(nullptr, globalObject(pluginWorld()));
     }
     return m_cacheableBindingRootObject.get();
 }
@@ -520,18 +518,18 @@ Bindings::RootObject* ScriptController::cacheableBindingRootObject()
 Bindings::RootObject* ScriptController::bindingRootObject()
 {
     if (!canExecuteScripts(NotAboutToExecuteScript))
-        return 0;
+        return nullptr;
 
     if (!m_bindingRootObject) {
         JSLockHolder lock(commonVM());
-        m_bindingRootObject = Bindings::RootObject::create(0, globalObject(pluginWorld()));
+        m_bindingRootObject = Bindings::RootObject::create(nullptr, globalObject(pluginWorld()));
     }
     return m_bindingRootObject.get();
 }
 
 Ref<Bindings::RootObject> ScriptController::createRootObject(void* nativeHandle)
 {
-    RootObjectMap::iterator it = m_rootObjects.find(nativeHandle);
+    auto it = m_rootObjects.find(nativeHandle);
     if (it != m_rootObjects.end())
         return it->value.copyRef();
 
@@ -543,10 +541,10 @@ Ref<Bindings::RootObject> ScriptController::createRootObject(void* nativeHandle)
 
 void ScriptController::collectIsolatedContexts(Vector<std::pair<JSC::ExecState*, SecurityOrigin*>>& result)
 {
-    for (ShellMap::iterator iter = m_windowShells.begin(); iter != m_windowShells.end(); ++iter) {
-        JSC::ExecState* exec = iter->value->window()->globalExec();
-        SecurityOrigin* origin = &iter->value->window()->wrapped().document()->securityOrigin();
-        result.append(std::pair<JSC::ExecState*, SecurityOrigin*>(exec, origin));
+    for (auto& windowProxy : m_windowProxies.values()) {
+        auto* exec = windowProxy->window()->globalExec();
+        auto* origin = &windowProxy->window()->wrapped().document()->securityOrigin();
+        result.append(std::make_pair(exec, origin));
     }
 }
 
@@ -558,10 +556,10 @@ NPObject* ScriptController::windowScriptNPObject()
         if (canExecuteScripts(NotAboutToExecuteScript)) {
             // JavaScript is enabled, so there is a JavaScript window object.
             // Return an NPObject bound to the window object.
-            JSDOMWindow* win = windowShell(pluginWorld())->window();
-            ASSERT(win);
+            auto* window = windowProxy(pluginWorld())->window();
+            ASSERT(window);
             Bindings::RootObject* root = bindingRootObject();
-            m_windowScriptNPObject = _NPN_CreateScriptObject(0, win, root);
+            m_windowScriptNPObject = _NPN_CreateScriptObject(0, window, root);
         } else {
             // JavaScript is not enabled, so we cannot bind the NPObject to the JavaScript window object.
             // Instead, we create an NPObject of a different class, one which is not bound to a JavaScript object.
@@ -587,16 +585,16 @@ JSObject* ScriptController::jsObjectForPluginElement(HTMLPlugInElement* plugin)
 {
     // Can't create JSObjects when JavaScript is disabled
     if (!canExecuteScripts(NotAboutToExecuteScript))
-        return 0;
+        return nullptr;
 
     JSLockHolder lock(commonVM());
 
     // Create a JSObject bound to this element
-    JSDOMWindow* globalObj = globalObject(pluginWorld());
+    auto* globalObj = globalObject(pluginWorld());
     // FIXME: is normal okay? - used for NP plugins?
     JSValue jsElementValue = toJS(globalObj->globalExec(), globalObj, plugin);
     if (!jsElementValue || !jsElementValue.isObject())
-        return 0;
+        return nullptr;
     
     return jsElementValue.getObject();
 }
@@ -615,8 +613,7 @@ void ScriptController::disconnectPlatformScriptObjects()
 
 void ScriptController::cleanupScriptObjectsForPlugin(void* nativeHandle)
 {
-    RootObjectMap::iterator it = m_rootObjects.find(nativeHandle);
-
+    auto it = m_rootObjects.find(nativeHandle);
     if (it == m_rootObjects.end())
         return;
 
@@ -628,9 +625,8 @@ void ScriptController::clearScriptObjects()
 {
     JSLockHolder lock(commonVM());
 
-    RootObjectMap::const_iterator end = m_rootObjects.end();
-    for (RootObjectMap::const_iterator it = m_rootObjects.begin(); it != end; ++it)
-        it->value->invalidate();
+    for (auto& rootObject : m_rootObjects.values())
+        rootObject->invalidate();
 
     m_rootObjects.clear();
 
@@ -718,7 +714,7 @@ bool ScriptController::executeIfJavaScriptURL(const URL& url, ShouldReplaceDocum
         return true;
 
     String scriptResult;
-    if (!result || !result.getString(windowShell(mainThreadNormalWorld())->window()->globalExec(), scriptResult))
+    if (!result || !result.getString(windowProxy(mainThreadNormalWorld())->window()->globalExec(), scriptResult))
         return true;
 
     // FIXME: We should always replace the document, but doing so
index e22a63f..37f489a 100644 (file)
@@ -22,7 +22,7 @@
 #pragma once
 
 #include "FrameLoaderTypes.h"
-#include "JSDOMWindowShell.h"
+#include "JSDOMWindowProxy.h"
 #include <JavaScriptCore/JSBase.h>
 #include <heap/Strong.h>
 #include <wtf/Forward.h>
@@ -62,8 +62,6 @@ class URL;
 class Widget;
 struct ExceptionDetails;
 
-using RootObjectMap = HashMap<void*, Ref<JSC::Bindings::RootObject>>;
-
 enum ReasonForCallingCanExecuteScripts {
     AboutToExecuteScript,
     NotAboutToExecuteScript
@@ -72,7 +70,8 @@ enum ReasonForCallingCanExecuteScripts {
 class ScriptController {
     WTF_MAKE_FAST_ALLOCATED;
 
-    typedef HashMap<RefPtr<DOMWrapperWorld>, JSC::Strong<JSDOMWindowShell>> ShellMap;
+    using ProxyMap = HashMap<RefPtr<DOMWrapperWorld>, JSC::Strong<JSDOMWindowProxy>>;
+    using RootObjectMap = HashMap<void*, Ref<JSC::Bindings::RootObject>>;
 
 public:
     explicit ScriptController(Frame&);
@@ -80,24 +79,24 @@ public:
 
     WEBCORE_EXPORT static Ref<DOMWrapperWorld> createWorld();
 
-    JSDOMWindowShell& createWindowShell(DOMWrapperWorld&);
-    void destroyWindowShell(DOMWrapperWorld&);
+    JSDOMWindowProxy& createWindowProxy(DOMWrapperWorld&);
+    void destroyWindowProxy(DOMWrapperWorld&);
 
-    Vector<JSC::Strong<JSDOMWindowShell>> windowShells();
+    Vector<JSC::Strong<JSDOMWindowProxy>> windowProxies();
 
-    JSDOMWindowShell* windowShell(DOMWrapperWorld& world)
+    JSDOMWindowProxy* windowProxy(DOMWrapperWorld& world)
     {
-        ShellMap::iterator iter = m_windowShells.find(&world);
-        return (iter != m_windowShells.end()) ? iter->value.get() : initScript(world);
+        auto iter = m_windowProxies.find(&world);
+        return (iter != m_windowProxies.end()) ? iter->value.get() : initScript(world);
     }
-    JSDOMWindowShell* existingWindowShell(DOMWrapperWorld& world) const
+    JSDOMWindowProxy* existingWindowProxy(DOMWrapperWorld& world) const
     {
-        ShellMap::const_iterator iter = m_windowShells.find(&world);
-        return (iter != m_windowShells.end()) ? iter->value.get() : 0;
+        auto iter = m_windowProxies.find(&world);
+        return (iter != m_windowProxies.end()) ? iter->value.get() : 0;
     }
     JSDOMWindow* globalObject(DOMWrapperWorld& world)
     {
-        return windowShell(world)->window();
+        return windowProxy(world)->window();
     }
 
     static void getAllWorlds(Vector<Ref<DOMWrapperWorld>>&);
@@ -139,16 +138,16 @@ public:
     WEBCORE_EXPORT bool canExecuteScripts(ReasonForCallingCanExecuteScripts);
 
     // Debugger can be 0 to detach any existing Debugger.
-    void attachDebugger(JSC::Debugger*); // Attaches/detaches in all worlds/window shells.
-    void attachDebugger(JSDOMWindowShell*, JSC::Debugger*);
+    void attachDebugger(JSC::Debugger*); // Attaches/detaches in all worlds/window proxies.
+    void attachDebugger(JSDOMWindowProxy*, JSC::Debugger*);
 
     void setPaused(bool b) { m_paused = b; }
     bool isPaused() const { return m_paused; }
 
     const String* sourceURL() const { return m_sourceURL; } // 0 if we are not evaluating any script
 
-    void clearWindowShellsNotMatchingDOMWindow(DOMWindow*, bool goingIntoPageCache);
-    void setDOMWindowForWindowShell(DOMWindow*);
+    void clearWindowProxiesNotMatchingDOMWindow(DOMWindow*, bool goingIntoPageCache);
+    void setDOMWindowForWindowProxy(DOMWindow*);
     void updateDocument();
 
     void namedItemAdded(HTMLDocument*, const AtomicString&) { }
@@ -179,12 +178,12 @@ public:
 #endif
 
 private:
-    WEBCORE_EXPORT JSDOMWindowShell* initScript(DOMWrapperWorld&);
+    WEBCORE_EXPORT JSDOMWindowProxy* initScript(DOMWrapperWorld&);
     void setupModuleScriptHandlers(LoadableModuleScript&, JSC::JSInternalPromise&, DOMWrapperWorld&);
 
     void disconnectPlatformScriptObjects();
 
-    ShellMap m_windowShells;
+    ProxyMap m_windowProxies;
     Frame& m_frame;
     const String* m_sourceURL;
 
index 363c335..0124ffc 100644 (file)
@@ -103,7 +103,7 @@ WebScriptObject *ScriptController::windowScriptObject()
     if (!m_windowScriptObject) {
         JSC::JSLockHolder lock(commonVM());
         JSC::Bindings::RootObject* root = bindingRootObject();
-        m_windowScriptObject = [WebScriptObject scriptObjectForJSObject:toRef(windowShell(pluginWorld())) originRootObject:root rootObject:root];
+        m_windowScriptObject = [WebScriptObject scriptObjectForJSObject:toRef(windowProxy(pluginWorld())) originRootObject:root rootObject:root];
     }
 
     return m_windowScriptObject.get();
index 301c7cc..f1530bd 100644 (file)
@@ -76,8 +76,7 @@ JSC::ExecState* mainWorldExecState(Frame* frame)
 {
     if (!frame)
         return nullptr;
-    JSDOMWindowShell* shell = frame->script().windowShell(mainThreadNormalWorld());
-    return shell->window()->globalExec();
+    return frame->script().windowProxy(mainThreadNormalWorld())->window()->globalExec();
 }
 
 JSC::ExecState* execStateFromNode(DOMWrapperWorld& world, Node* node)
index 9b9bf99..93455ee 100644 (file)
@@ -2310,7 +2310,7 @@ sub GenerateHeader
         }
     }
 
-    push(@headerContent, "class JSDOMWindowShell;\n\n") if $interfaceName eq "DOMWindow";
+    push(@headerContent, "class JSDOMWindowProxy;\n\n") if $interfaceName eq "DOMWindow";
 
     my $exportMacro = GetExportMacroForJSClass($interface);
 
@@ -2323,10 +2323,10 @@ sub GenerateHeader
     push(@headerContent, "    using DOMWrapped = $implType;\n") if $hasParent;
 
     if ($interfaceName eq "DOMWindow") {
-        push(@headerContent, "    static $className* create(JSC::VM& vm, JSC::Structure* structure, Ref<$implType>&& impl, JSDOMWindowShell* windowShell)\n");
+        push(@headerContent, "    static $className* create(JSC::VM& vm, JSC::Structure* structure, Ref<$implType>&& impl, JSDOMWindowProxy* proxy)\n");
         push(@headerContent, "    {\n");
-        push(@headerContent, "        $className* ptr = new (NotNull, JSC::allocateCell<$className>(vm.heap)) ${className}(vm, structure, WTFMove(impl), windowShell);\n");
-        push(@headerContent, "        ptr->finishCreation(vm, windowShell);\n");
+        push(@headerContent, "        $className* ptr = new (NotNull, JSC::allocateCell<$className>(vm.heap)) ${className}(vm, structure, WTFMove(impl), proxy);\n");
+        push(@headerContent, "        ptr->finishCreation(vm, proxy);\n");
         push(@headerContent, "        return ptr;\n");
         push(@headerContent, "    }\n\n");
     } elsif ($codeGenerator->InheritsInterface($interface, "WorkerGlobalScope")) {
@@ -2642,7 +2642,7 @@ sub GenerateHeader
 
     # Constructor
     if ($interfaceName eq "DOMWindow") {
-        push(@headerContent, "    $className(JSC::VM&, JSC::Structure*, Ref<$implType>&&, JSDOMWindowShell*);\n");
+        push(@headerContent, "    $className(JSC::VM&, JSC::Structure*, Ref<$implType>&&, JSDOMWindowProxy*);\n");
     } elsif ($codeGenerator->InheritsInterface($interface, "WorkerGlobalScope")) {
         push(@headerContent, "    $className(JSC::VM&, JSC::Structure*, Ref<$implType>&&);\n");
     } elsif (!NeedsImplementationClass($interface)) {
@@ -2652,7 +2652,7 @@ sub GenerateHeader
     }
 
     if ($interfaceName eq "DOMWindow") {
-        push(@headerContent, "    void finishCreation(JSC::VM&, JSDOMWindowShell*);\n");
+        push(@headerContent, "    void finishCreation(JSC::VM&, JSDOMWindowProxy*);\n");
     } elsif ($codeGenerator->InheritsInterface($interface, "WorkerGlobalScope")) {
         push(@headerContent, "    void finishCreation(JSC::VM&, JSC::JSProxy*);\n");
     } else {
@@ -3236,8 +3236,8 @@ sub GenerateOverloadDispatcher
                 for my $subtype (@subtypes) {
                     if ($codeGenerator->IsWrapperType($subtype) || $codeGenerator->IsTypedArrayType($subtype)) {
                         if ($subtype->name eq "DOMWindow") {
-                            AddToImplIncludes("JSDOMWindowShell.h");
-                            &$generateOverloadCallIfNecessary($overload, "distinguishingArg.isObject() && (asObject(distinguishingArg)->inherits(vm, JSDOMWindowShell::info()) || asObject(distinguishingArg)->inherits(vm, JSDOMWindow::info()))");
+                            AddToImplIncludes("JSDOMWindowProxy.h");
+                            &$generateOverloadCallIfNecessary($overload, "distinguishingArg.isObject() && (asObject(distinguishingArg)->inherits(vm, JSDOMWindowProxy::info()) || asObject(distinguishingArg)->inherits(vm, JSDOMWindow::info()))");
                         } else {
                             &$generateOverloadCallIfNecessary($overload, "distinguishingArg.isObject() && asObject(distinguishingArg)->inherits(vm, JS" . $subtype->name . "::info())");
                         }
@@ -4005,9 +4005,9 @@ sub GenerateImplementation
 
     # Constructor
     if ($interfaceName eq "DOMWindow") {
-        AddIncludesForImplementationTypeInImpl("JSDOMWindowShell");
-        push(@implContent, "${className}::$className(VM& vm, Structure* structure, Ref<$implType>&& impl, JSDOMWindowShell* shell)\n");
-        push(@implContent, "    : $parentClassName(vm, structure, WTFMove(impl), shell)\n");
+        AddIncludesForImplementationTypeInImpl("JSDOMWindowProxy");
+        push(@implContent, "${className}::$className(VM& vm, Structure* structure, Ref<$implType>&& impl, JSDOMWindowProxy* proxy)\n");
+        push(@implContent, "    : $parentClassName(vm, structure, WTFMove(impl), proxy)\n");
         push(@implContent, "{\n");
         push(@implContent, "}\n\n");
     } elsif ($codeGenerator->InheritsInterface($interface, "WorkerGlobalScope")) {
@@ -4028,9 +4028,9 @@ sub GenerateImplementation
 
     # Finish Creation
     if ($interfaceName eq "DOMWindow") {
-        push(@implContent, "void ${className}::finishCreation(VM& vm, JSDOMWindowShell* shell)\n");
+        push(@implContent, "void ${className}::finishCreation(VM& vm, JSDOMWindowProxy* proxy)\n");
         push(@implContent, "{\n");
-        push(@implContent, "    Base::finishCreation(vm, shell);\n\n");
+        push(@implContent, "    Base::finishCreation(vm, proxy);\n\n");
     } elsif ($codeGenerator->InheritsInterface($interface, "WorkerGlobalScope")) {
         push(@implContent, "void ${className}::finishCreation(VM& vm, JSProxy* proxy)\n");
         push(@implContent, "{\n");
index 31e0e27..cf6b08a 100644 (file)
@@ -38,7 +38,7 @@
 #include "JSDOMStringList.h"
 #include "JSDOMWindow.h"
 #include "JSDOMWindowBase.h"
-#include "JSDOMWindowShell.h"
+#include "JSDOMWindowProxy.h"
 #include "JSDOMWrapperCache.h"
 #include "JSDocument.h"
 #include "JSElement.h"
@@ -6726,7 +6726,7 @@ static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethodOver
             return jsTestObjPrototypeFunctionOverloadedMethod6Body(state, castedThis, throwScope);
         if (distinguishingArg.isObject() && asObject(distinguishingArg)->inherits(vm, JSTestObj::info()))
             return jsTestObjPrototypeFunctionOverloadedMethod8Body(state, castedThis, throwScope);
-        if (distinguishingArg.isObject() && (asObject(distinguishingArg)->inherits(vm, JSDOMWindowShell::info()) || asObject(distinguishingArg)->inherits(vm, JSDOMWindow::info())))
+        if (distinguishingArg.isObject() && (asObject(distinguishingArg)->inherits(vm, JSDOMWindowProxy::info()) || asObject(distinguishingArg)->inherits(vm, JSDOMWindow::info())))
             return jsTestObjPrototypeFunctionOverloadedMethod9Body(state, castedThis, throwScope);
         if (distinguishingArg.isObject() && asObject(distinguishingArg)->inherits(vm, JSBlob::info()))
             return jsTestObjPrototypeFunctionOverloadedMethod13Body(state, castedThis, throwScope);
index 91cb4ee..aa4b808 100644 (file)
@@ -619,7 +619,7 @@ void FrameLoader::clear(Document* newDocument, bool clearWindowProperties, bool
     if (clearWindowProperties) {
         InspectorInstrumentation::frameWindowDiscarded(m_frame, m_frame.document()->domWindow());
         m_frame.document()->domWindow()->resetUnlessSuspendedForDocumentSuspension();
-        m_frame.script().clearWindowShellsNotMatchingDOMWindow(newDocument->domWindow(), m_frame.document()->pageCacheState() == Document::AboutToEnterPageCache);
+        m_frame.script().clearWindowProxiesNotMatchingDOMWindow(newDocument->domWindow(), m_frame.document()->pageCacheState() == Document::AboutToEnterPageCache);
 
         if (shouldClearWindowName(m_frame, *newDocument))
             m_frame.tree().setName(nullAtom);
@@ -638,7 +638,7 @@ void FrameLoader::clear(Document* newDocument, bool clearWindowProperties, bool
     subframeLoader().clear();
 
     if (clearWindowProperties)
-        m_frame.script().setDOMWindowForWindowShell(newDocument->domWindow());
+        m_frame.script().setDOMWindowForWindowProxy(newDocument->domWindow());
 
     if (clearScriptObjects)
         m_frame.script().clearScriptObjects();
@@ -3532,7 +3532,7 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
 
 void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world)
 {
-    if (!m_frame.script().canExecuteScripts(NotAboutToExecuteScript) || !m_frame.script().existingWindowShell(world))
+    if (!m_frame.script().canExecuteScripts(NotAboutToExecuteScript) || !m_frame.script().existingWindowProxy(world))
         return;
 
     m_client.dispatchDidClearWindowObjectInWorld(world);
index 3082382..96ac904 100644 (file)
@@ -66,7 +66,7 @@
 #include "HitTestResult.h"
 #include "ImageBuffer.h"
 #include "InspectorInstrumentation.h"
-#include "JSDOMWindowShell.h"
+#include "JSDOMWindowProxy.h"
 #include "Logging.h"
 #include "MainFrame.h"
 #include "MathMLNames.h"
index f1a03f6..e277168 100644 (file)
@@ -42,7 +42,7 @@
 #include "Frame.h"
 #include "HTMLParserIdioms.h"
 #include "InspectorInstrumentation.h"
-#include "JSDOMWindowShell.h"
+#include "JSDOMWindowProxy.h"
 #include "JSMainThreadExecState.h"
 #include "ParsingUtilities.h"
 #include "PingLoader.h"
@@ -148,13 +148,13 @@ bool ContentSecurityPolicy::allowRunningOrDisplayingInsecureContent(const URL& u
     return allow;
 }
 
-void ContentSecurityPolicy::didCreateWindowShell(JSDOMWindowShell& windowShell) const
+void ContentSecurityPolicy::didCreateWindowProxy(JSDOMWindowProxy& windowProxy) const
 {
-    JSDOMWindow* window = windowShell.window();
+    auto* window = windowProxy.window();
     ASSERT(window);
     ASSERT(window->scriptExecutionContext());
     ASSERT(window->scriptExecutionContext()->contentSecurityPolicy() == this);
-    if (!windowShell.world().isNormal()) {
+    if (!windowProxy.world().isNormal()) {
         window->setEvalEnabled(true);
         return;
     }
index 68974a2..3d8bd0c 100644 (file)
@@ -50,7 +50,7 @@ class ContentSecurityPolicyDirectiveList;
 class ContentSecurityPolicySource;
 class DOMStringList;
 class Frame;
-class JSDOMWindowShell;
+class JSDOMWindowProxy;
 class ResourceRequest;
 class ScriptExecutionContext;
 class SecurityOrigin;
@@ -70,7 +70,7 @@ public:
     void copyStateFrom(const ContentSecurityPolicy*);
     void copyUpgradeInsecureRequestStateFrom(const ContentSecurityPolicy&);
 
-    void didCreateWindowShell(JSDOMWindowShell&) const;
+    void didCreateWindowProxy(JSDOMWindowProxy&) const;
 
     enum class PolicyFrom {
         API,
index 0080087..06fb469 100644 (file)
@@ -1,3 +1,13 @@
+2017-06-13  Sam Weinig  <sam@webkit.org>
+
+        Rename JSDOMWindowShell to JSDOMWindowProxy to match the HTML5 spec.
+        https://bugs.webkit.org/show_bug.cgi?id=80733
+
+        Reviewed by Chris Dumez.
+
+        * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
+        (HeapSnapshot.prototype._isNodeGlobalObject):
+
 2017-06-12  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Add grid to images to clarify transparency and image size
index b9e14dd..1f2f7a1 100644 (file)
@@ -709,7 +709,7 @@ HeapSnapshot = class HeapSnapshot
     {
         let className = this._nodeClassNamesTable[this._nodes[nodeIndex + nodeClassNameOffset]];
         return className === "Window"
-            || className === "JSDOMWindowShell"
+            || className === "JSDOMWindowProxy"
             || className === "GlobalObject";
     }
 
index 7b899bc..1b01eee 100644 (file)
@@ -1,3 +1,18 @@
+2017-06-13  Sam Weinig  <sam@webkit.org>
+
+        Rename JSDOMWindowShell to JSDOMWindowProxy to match the HTML5 spec.
+        https://bugs.webkit.org/show_bug.cgi?id=80733
+
+        Reviewed by Chris Dumez.
+
+        * DOM/DOMUtility.mm:
+        (createDOMWrapper):
+        * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+        (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
+        * WebView/WebFrame.mm:
+        (-[WebFrame _attachScriptDebugger]):
+        (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
+
 2017-06-12  Jiewen Tan  <jiewen_tan@apple.com>
 
         [WebCrypto] Remove experimental feature flag of SubtleCrypto
index 72e74a8..9791266 100644 (file)
@@ -51,7 +51,7 @@
 #import <WebCore/JSCSSRuleList.h>
 #import <WebCore/JSCSSStyleDeclaration.h>
 #import <WebCore/JSDOMImplementation.h>
-#import <WebCore/JSDOMWindowShell.h>
+#import <WebCore/JSDOMWindowProxy.h>
 #import <WebCore/JSDeprecatedCSSOMCounter.h>
 #import <WebCore/JSDeprecatedCSSOMRGBColor.h>
 #import <WebCore/JSDeprecatedCSSOMRect.h>
@@ -85,7 +85,7 @@ static WebScriptObject *createDOMWrapper(JSC::JSObject& jsWrapper)
     WRAP(DeprecatedCSSOMValue)
     WRAP(DeprecatedCSSOMCounter)
     WRAP(DOMImplementation)
-    WRAP(DOMWindowShell)
+    WRAP(DOMWindowProxy)
     WRAP(Event)
     WRAP(HTMLOptionsCollection)
     WRAP(MediaList)
index fb8974d..1ac69fe 100644 (file)
@@ -841,7 +841,7 @@ bool NetscapePluginInstanceProxy::getWindowNPObject(uint32_t& objectID)
     if (!frame->script().canExecuteScripts(NotAboutToExecuteScript))
         objectID = 0;
     else
-        objectID = m_localObjects.idForObject(pluginWorld().vm(), frame->script().windowShell(pluginWorld())->window());
+        objectID = m_localObjects.idForObject(pluginWorld().vm(), frame->script().windowProxy(pluginWorld())->window());
         
     return true;
 }
index 98f9682..5c0bd9b 100644 (file)
@@ -365,10 +365,10 @@ static NSURL *createUniqueWebDataURL();
 {
     ScriptController& scriptController = _private->coreFrame->script();
 
-    // Calling ScriptController::globalObject() would create a window shell, and dispatch corresponding callbacks, which may be premature
+    // Calling ScriptController::globalObject() would create a window proxy, and dispatch corresponding callbacks, which may be premature
     // if the script debugger is attached before a document is created.  These calls use the debuggerWorld(), we will need to pass a world
     // to be able to debug isolated worlds.
-    if (!scriptController.existingWindowShell(debuggerWorld()))
+    if (!scriptController.existingWindowProxy(debuggerWorld()))
         return;
 
     JSGlobalObject* globalObject = scriptController.globalObject(debuggerWorld());
@@ -2078,11 +2078,11 @@ static WebFrameLoadType toWebFrameLoadType(FrameLoadType frameLoadType)
     // Start off with some guess at a frame and a global object, we'll try to do better...!
     JSDOMWindow* anyWorldGlobalObject = _private->coreFrame->script().globalObject(mainThreadNormalWorld());
 
-    // The global object is probably a shell object? - if so, we know how to use this!
+    // The global object is probably a proxy object? - if so, we know how to use this!
     JSC::JSObject* globalObjectObj = toJS(globalObjectRef);
     JSC::VM& vm = *globalObjectObj->vm();
-    if (!strcmp(globalObjectObj->classInfo(vm)->className, "JSDOMWindowShell"))
-        anyWorldGlobalObject = static_cast<JSDOMWindowShell*>(globalObjectObj)->window();
+    if (!strcmp(globalObjectObj->classInfo(vm)->className, "JSDOMWindowProxy"))
+        anyWorldGlobalObject = static_cast<JSDOMWindowProxy*>(globalObjectObj)->window();
 
     // Get the frame frome the global object we've settled on.
     Frame* frame = anyWorldGlobalObject->wrapped().frame();
index bb62711..67ee2dc 100644 (file)
@@ -1,3 +1,13 @@
+2017-06-13  Sam Weinig  <sam@webkit.org>
+
+        Rename JSDOMWindowShell to JSDOMWindowProxy to match the HTML5 spec.
+        https://bugs.webkit.org/show_bug.cgi?id=80733
+
+        Reviewed by Chris Dumez.
+
+        * WebFrame.cpp:
+        (WebFrame::stringByEvaluatingJavaScriptInScriptWorld):
+
 2017-06-12  Daewoong Jang  <daewoong.jang@navercorp.com>
 
         Remove WebCore::unloadModule and related data types
index 276f5a4..0c2ea7d 100644 (file)
@@ -2001,10 +2001,10 @@ HRESULT WebFrame::stringByEvaluatingJavaScriptInScriptWorld(IWebScriptWorld* iWo
     // Start off with some guess at a frame and a global object, we'll try to do better...!
     JSDOMWindow* anyWorldGlobalObject = coreFrame->script().globalObject(mainThreadNormalWorld());
 
-    // The global object is probably a shell object? - if so, we know how to use this!
+    // The global object is probably a proxy object? - if so, we know how to use this!
     JSC::JSObject* globalObjectObj = toJS(globalObjectRef);
-    if (globalObjectObj->inherits(*globalObjectObj->vm(), JSDOMWindowShell::info()))
-        anyWorldGlobalObject = static_cast<JSDOMWindowShell*>(globalObjectObj)->window();
+    if (globalObjectObj->inherits(*globalObjectObj->vm(), JSDOMWindowProxy::info()))
+        anyWorldGlobalObject = static_cast<JSDOMWindowProxy*>(globalObjectObj)->window();
 
     // Get the frame frome the global object we've settled on.
     Frame* frame = anyWorldGlobalObject->wrapped().frame();
index 53360a8..f7db5aa 100644 (file)
@@ -1,3 +1,13 @@
+2017-06-13  Sam Weinig  <sam@webkit.org>
+
+        Rename JSDOMWindowShell to JSDOMWindowProxy to match the HTML5 spec.
+        https://bugs.webkit.org/show_bug.cgi?id=80733
+
+        Reviewed by Chris Dumez.
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::windowScriptNPObject):
+
 2017-06-13  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Remove unused code from GTK+ WebKitPrivate.
index 6cb84c6..2d232ac 100644 (file)
@@ -1453,7 +1453,7 @@ NPObject* PluginView::windowScriptNPObject()
         return 0;
     }
 
-    return m_npRuntimeObjectMap.getOrCreateNPObject(pluginWorld().vm(), frame()->script().windowShell(pluginWorld())->window());
+    return m_npRuntimeObjectMap.getOrCreateNPObject(pluginWorld().vm(), frame()->script().windowProxy(pluginWorld())->window());
 }
 
 NPObject* PluginView::pluginElementNPObject()