Commit 8f716033 authored by weinig@apple.com's avatar weinig@apple.com

CTTE: DOMWrapperWorlds should be passed around by reference

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

Reviewed by Andreas Kling.

../WebCore: 

* bindings/js/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::DOMWrapperWorld):
(WebCore::DOMWrapperWorld::~DOMWrapperWorld):
(WebCore::DOMWrapperWorld::clearWrappers):
(WebCore::normalWorld):
(WebCore::mainThreadNormalWorld):
* bindings/js/DOMWrapperWorld.h:
(WebCore::debuggerWorld):
(WebCore::pluginWorld):
(WebCore::currentWorld):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::JSCSSValueOwner::finalize):
* bindings/js/JSDOMBinding.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
(WebCore::getInlineCachedWrapper):
(WebCore::setInlineCachedWrapper):
(WebCore::clearInlineCachedWrapper):
(WebCore::getCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::uncacheWrapper):
(WebCore::jsStringWithCache):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
(WebCore::toJSDOMGlobalObject):
* bindings/js/JSDOMGlobalObject.h:
(WebCore::JSDOMGlobalObject::world):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::JSDOMWindowBase):
(WebCore::toJSDOMWindow):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::JSDOMWindowShell):
(WebCore::JSDOMWindowShell::setWindow):
(WebCore::toJSDOMWindowShell):
* bindings/js/JSDOMWindowShell.h:
(WebCore::JSDOMWindowShell::create):
(WebCore::JSDOMWindowShell::world):
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::JSErrorHandler):
* bindings/js/JSErrorHandler.h:
(WebCore::JSErrorHandler::create):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::create):
(WebCore::JSEventListener::isolatedWorld):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::getJSListenerFunctions):
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::JSLazyEventListener):
* bindings/js/JSLazyEventListener.h:
* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::JSMutationCallback):
(WebCore::JSMutationCallback::call):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNodeOwner::finalize):
* bindings/js/JSPluginElementFunctions.h:
(WebCore::pluginElementCustomGetOwnPropertySlot):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::create):
(WebCore::ScheduledAction::ScheduledAction):
(WebCore::ScheduledAction::execute):
* bindings/js/ScheduledAction.h:
(WebCore::ScheduledAction::ScheduledAction):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptCachedFrameData.h:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::~ScriptController):
(WebCore::ScriptController::destroyWindowShell):
(WebCore::ScriptController::createWindowShell):
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::getAllWorlds):
(WebCore::ScriptController::initScript):
(WebCore::ScriptController::executeScriptInWorld):
(WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
* bindings/js/ScriptController.h:
(WebCore::ScriptController::windowShell):
(WebCore::ScriptController::existingWindowShell):
(WebCore::ScriptController::globalObject):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::isContentScript):
* bindings/js/ScriptState.cpp:
(WebCore::execStateFromNode):
(WebCore::execStateFromPage):
* bindings/js/ScriptState.h:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
* bindings/js/WebCoreJSClientData.h:
(WebCore::WebCoreJSClientData::WebCoreJSClientData):
(WebCore::WebCoreJSClientData::normalWorld):
(WebCore::WebCoreJSClientData::getAllWorlds):
(WebCore::WebCoreJSClientData::rememberWorld):
(WebCore::WebCoreJSClientData::forgetWorld):
* bindings/js/WebCoreTypedArrayController.cpp:
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* dom/Document.cpp:
(WebCore::Document::ensurePlugInsInjectedScript):
* dom/Document.h:
* dom/DocumentStyleSheetCollection.cpp:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::ensureIsolatedWorld):
(WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
* html/HTMLMediaElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::plugInImageElementIsolatedWorld):
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::didClearWindowObjectInWorld):
* inspector/InspectorAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::didClearWindowObjectInWorld):
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
* inspector/InspectorPageAgent.h:
* loader/EmptyClients.h:
(WebCore::EmptyFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
(WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::dispatchGlobalObjectAvailable):
* page/CaptionUserPreferencesMediaAF.cpp:
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::DOMWindowExtension):
* page/DOMWindowExtension.h:
(WebCore::DOMWindowExtension::create):
(WebCore::DOMWindowExtension::world):
* page/Frame.cpp:
(WebCore::Frame::injectUserScripts):
(WebCore::Frame::injectUserScriptsForWorld):
* page/Frame.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::addUserScriptToWorld):
(WebCore::PageGroup::addUserStyleSheetToWorld):
(WebCore::PageGroup::removeUserScriptFromWorld):
(WebCore::PageGroup::removeUserStyleSheetFromWorld):
(WebCore::PageGroup::removeUserScriptsFromWorld):
(WebCore::PageGroup::removeUserStyleSheetsFromWorld):
* page/PageGroup.h:

../WebKit/efl: 

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::evaluateScriptInIsolatedWorld):
* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::dispatchDidClearWindowObjectInWorld):
* WebCoreSupport/FrameLoaderClientEfl.h:

../WebKit/gtk: 

* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidClearWindowObjectInWorld):
* WebCoreSupport/FrameLoaderClientGtk.h:

../WebKit/mac: 

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
(WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
(WebKit::NetscapePluginInstanceProxy::evaluate):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebView/WebFrame.mm:
(-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
(-[WebFrame _globalContextForScriptWorld:]):
(-[WebFrame jsWrapperForNode:inScriptWorld:]):
* WebView/WebScriptWorld.mm:
(+[WebScriptWorld standardWorld]):
(+[WebScriptWorld findOrCreateWorld:]):
* WebView/WebScriptWorldInternal.h:
* WebView/WebView.mm:
(-[WebView _injectOutlookQuirksScript]):
(+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
(+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
(+[WebView _removeUserScriptFromGroup:world:url:]):
(+[WebView _removeUserStyleSheetFromGroup:world:url:]):
(+[WebView _removeUserScriptsFromGroup:world:]):
(+[WebView _removeUserStyleSheetsFromGroup:world:]):

../WebKit/win: 

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebScriptWorld.cpp:
(WebScriptWorld::standardWorld):
(WebScriptWorld::findOrCreateWorld):
* WebScriptWorld.h:
(WebScriptWorld::world):

../WebKit/wince: 

* WebCoreSupport/FrameLoaderClientWinCE.cpp:
(WebKit::FrameLoaderClientWinCE::dispatchDidClearWindowObjectInWorld):
* WebCoreSupport/FrameLoaderClientWinCE.h:

../WebKit2: 

* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
(WebKit::InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
(WebKit::InjectedBundleScriptWorld::getOrCreate):
(WebKit::InjectedBundleScriptWorld::normalWorld):
(WebKit::InjectedBundleScriptWorld::coreWorld):
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowScriptNPObject):
(WebKit::PluginView::pluginElementNPObject):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
(WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1cef0abe
2013-10-01 Sam Weinig <sam@webkit.org>
CTTE: DOMWrapperWorlds should be passed around by reference
https://bugs.webkit.org/show_bug.cgi?id=122206
Reviewed by Andreas Kling.
* bindings/js/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::DOMWrapperWorld):
(WebCore::DOMWrapperWorld::~DOMWrapperWorld):
(WebCore::DOMWrapperWorld::clearWrappers):
(WebCore::normalWorld):
(WebCore::mainThreadNormalWorld):
* bindings/js/DOMWrapperWorld.h:
(WebCore::debuggerWorld):
(WebCore::pluginWorld):
(WebCore::currentWorld):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::JSCSSValueOwner::finalize):
* bindings/js/JSDOMBinding.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
(WebCore::getInlineCachedWrapper):
(WebCore::setInlineCachedWrapper):
(WebCore::clearInlineCachedWrapper):
(WebCore::getCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::uncacheWrapper):
(WebCore::jsStringWithCache):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
(WebCore::toJSDOMGlobalObject):
* bindings/js/JSDOMGlobalObject.h:
(WebCore::JSDOMGlobalObject::world):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::JSDOMWindowBase):
(WebCore::toJSDOMWindow):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::JSDOMWindowShell):
(WebCore::JSDOMWindowShell::setWindow):
(WebCore::toJSDOMWindowShell):
* bindings/js/JSDOMWindowShell.h:
(WebCore::JSDOMWindowShell::create):
(WebCore::JSDOMWindowShell::world):
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::JSErrorHandler):
* bindings/js/JSErrorHandler.h:
(WebCore::JSErrorHandler::create):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::create):
(WebCore::JSEventListener::isolatedWorld):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::getJSListenerFunctions):
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::JSLazyEventListener):
* bindings/js/JSLazyEventListener.h:
* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::JSMutationCallback):
(WebCore::JSMutationCallback::call):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNodeOwner::finalize):
* bindings/js/JSPluginElementFunctions.h:
(WebCore::pluginElementCustomGetOwnPropertySlot):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::create):
(WebCore::ScheduledAction::ScheduledAction):
(WebCore::ScheduledAction::execute):
* bindings/js/ScheduledAction.h:
(WebCore::ScheduledAction::ScheduledAction):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptCachedFrameData.h:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::~ScriptController):
(WebCore::ScriptController::destroyWindowShell):
(WebCore::ScriptController::createWindowShell):
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::getAllWorlds):
(WebCore::ScriptController::initScript):
(WebCore::ScriptController::executeScriptInWorld):
(WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
* bindings/js/ScriptController.h:
(WebCore::ScriptController::windowShell):
(WebCore::ScriptController::existingWindowShell):
(WebCore::ScriptController::globalObject):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::isContentScript):
* bindings/js/ScriptState.cpp:
(WebCore::execStateFromNode):
(WebCore::execStateFromPage):
* bindings/js/ScriptState.h:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
* bindings/js/WebCoreJSClientData.h:
(WebCore::WebCoreJSClientData::WebCoreJSClientData):
(WebCore::WebCoreJSClientData::normalWorld):
(WebCore::WebCoreJSClientData::getAllWorlds):
(WebCore::WebCoreJSClientData::rememberWorld):
(WebCore::WebCoreJSClientData::forgetWorld):
* bindings/js/WebCoreTypedArrayController.cpp:
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* dom/Document.cpp:
(WebCore::Document::ensurePlugInsInjectedScript):
* dom/Document.h:
* dom/DocumentStyleSheetCollection.cpp:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::ensureIsolatedWorld):
(WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
* html/HTMLMediaElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::plugInImageElementIsolatedWorld):
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::didClearWindowObjectInWorld):
* inspector/InspectorAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::didClearWindowObjectInWorld):
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
* inspector/InspectorPageAgent.h:
* loader/EmptyClients.h:
(WebCore::EmptyFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
(WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::dispatchGlobalObjectAvailable):
* page/CaptionUserPreferencesMediaAF.cpp:
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::DOMWindowExtension):
* page/DOMWindowExtension.h:
(WebCore::DOMWindowExtension::create):
(WebCore::DOMWindowExtension::world):
* page/Frame.cpp:
(WebCore::Frame::injectUserScripts):
(WebCore::Frame::injectUserScriptsForWorld):
* page/Frame.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::addUserScriptToWorld):
(WebCore::PageGroup::addUserStyleSheetToWorld):
(WebCore::PageGroup::removeUserScriptFromWorld):
(WebCore::PageGroup::removeUserStyleSheetFromWorld):
(WebCore::PageGroup::removeUserScriptsFromWorld):
(WebCore::PageGroup::removeUserStyleSheetsFromWorld):
* page/PageGroup.h:
2013-10-02 Zan Dobersek <zdobersek@igalia.com>
Unreviewed, removing references to the recently removed Modules/filesystem directory.
......@@ -564,13 +564,13 @@ __ZN7WebCore16NavigationActionC1ERKNS_15ResourceRequestENS_13FrameLoadTypeEb
__ZN7WebCore16NavigationActionC1ERKNS_15ResourceRequestENS_14NavigationTypeE
__ZN7WebCore16NavigationActionC1Ev
__ZN7WebCore16ResourceResponse19setCertificateChainEPK9__CFArray
__ZN7WebCore16ScriptController10initScriptEPNS_15DOMWrapperWorldE
__ZN7WebCore16ScriptController10initScriptERNS_15DOMWrapperWorldE
__ZN7WebCore16ScriptController11createWorldEv
__ZN7WebCore16ScriptController13executeScriptERKN3WTF6StringEb
__ZN7WebCore16ScriptController17canExecuteScriptsENS_33ReasonForCallingCanExecuteScriptsE
__ZN7WebCore16ScriptController17javaScriptContextEv
__ZN7WebCore16ScriptController18windowScriptObjectEv
__ZN7WebCore16ScriptController20executeScriptInWorldEPNS_15DOMWrapperWorldERKN3WTF6StringEb
__ZN7WebCore16ScriptController20executeScriptInWorldERNS_15DOMWrapperWorldERKN3WTF6StringEb
__ZN7WebCore16ScriptController21processingUserGestureEv
__ZN7WebCore16ScriptController24jsObjectForPluginElementEPNS_17HTMLPlugInElementE
__ZN7WebCore16ThreadGlobalData10staticDataE
......@@ -614,7 +614,7 @@ __ZN7WebCore17languageDidChangeEv
__ZN7WebCore17openTemporaryFileERKN3WTF6StringERi
__ZN7WebCore17setCookiesFromDOMERKNS_21NetworkStorageSessionERKNS_3URLES5_RKN3WTF6StringE
__ZN7WebCore17userVisibleStringEP5NSURL
__ZN7WebCore18DOMWindowExtensionC1EPNS_5FrameEPNS_15DOMWrapperWorldE
__ZN7WebCore18DOMWindowExtensionC1EPNS_5FrameERNS_15DOMWrapperWorldE
__ZN7WebCore18PlatformPasteboard10uniqueNameEv
__ZN7WebCore18PlatformPasteboard13bufferForTypeERKN3WTF6StringE
__ZN7WebCore18PlatformPasteboard13stringForTypeERKN3WTF6StringE
......@@ -1257,16 +1257,16 @@ __ZN7WebCore9PageGroup16syncLocalStorageEv
__ZN7WebCore9PageGroup17closeLocalStorageEv
__ZN7WebCore9PageGroup18addVisitedLinkHashEy
__ZN7WebCore9PageGroup18numberOfPageGroupsEv
__ZN7WebCore9PageGroup20addUserScriptToWorldEPNS_15DOMWrapperWorldERKN3WTF6StringERKNS_3URLERKNS3_6VectorIS4_Lm0ENS3_15CrashOnOverflowEEESE_NS_23UserScriptInjectionTimeENS_25UserContentInjectedFramesE
__ZN7WebCore9PageGroup20addUserScriptToWorldERNS_15DOMWrapperWorldERKN3WTF6StringERKNS_3URLERKNS3_6VectorIS4_Lm0ENS3_15CrashOnOverflowEEESE_NS_23UserScriptInjectionTimeENS_25UserContentInjectedFramesE
__ZN7WebCore9PageGroup20removeAllUserContentEv
__ZN7WebCore9PageGroup21removeAllVisitedLinksEv
__ZN7WebCore9PageGroup24addUserStyleSheetToWorldEPNS_15DOMWrapperWorldERKN3WTF6StringERKNS_3URLERKNS3_6VectorIS4_Lm0ENS3_15CrashOnOverflowEEESE_NS_25UserContentInjectedFramesENS_14UserStyleLevelENS_22UserStyleInjectionTimeE
__ZN7WebCore9PageGroup25removeUserScriptFromWorldEPNS_15DOMWrapperWorldERKNS_3URLE
__ZN7WebCore9PageGroup26removeUserScriptsFromWorldEPNS_15DOMWrapperWorldE
__ZN7WebCore9PageGroup24addUserStyleSheetToWorldERNS_15DOMWrapperWorldERKN3WTF6StringERKNS_3URLERKNS3_6VectorIS4_Lm0ENS3_15CrashOnOverflowEEESE_NS_25UserContentInjectedFramesENS_14UserStyleLevelENS_22UserStyleInjectionTimeE
__ZN7WebCore9PageGroup25removeUserScriptFromWorldERNS_15DOMWrapperWorldERKNS_3URLE
__ZN7WebCore9PageGroup26removeUserScriptsFromWorldERNS_15DOMWrapperWorldE
__ZN7WebCore9PageGroup26setShouldTrackVisitedLinksEb
__ZN7WebCore9PageGroup29removeUserStyleSheetFromWorldEPNS_15DOMWrapperWorldERKNS_3URLE
__ZN7WebCore9PageGroup29removeUserStyleSheetFromWorldERNS_15DOMWrapperWorldERKNS_3URLE
__ZN7WebCore9PageGroup30closeIdleLocalStorageDatabasesEv
__ZN7WebCore9PageGroup30removeUserStyleSheetsFromWorldEPNS_15DOMWrapperWorldE
__ZN7WebCore9PageGroup30removeUserStyleSheetsFromWorldERNS_15DOMWrapperWorldE
__ZN7WebCore9PageGroup9pageGroupERKN3WTF6StringE
__ZN7WebCore9Scrollbar10mouseMovedERKNS_18PlatformMouseEventE
__ZN7WebCore9Scrollbar11mouseExitedEv
......
......@@ -36,18 +36,18 @@ DOMWrapperWorld::DOMWrapperWorld(JSC::VM* vm, bool isNormal)
{
VM::ClientData* clientData = m_vm->clientData;
ASSERT(clientData);
static_cast<WebCoreJSClientData*>(clientData)->rememberWorld(this);
static_cast<WebCoreJSClientData*>(clientData)->rememberWorld(*this);
}
DOMWrapperWorld::~DOMWrapperWorld()
{
VM::ClientData* clientData = m_vm->clientData;
ASSERT(clientData);
static_cast<WebCoreJSClientData*>(clientData)->forgetWorld(this);
static_cast<WebCoreJSClientData*>(clientData)->forgetWorld(*this);
// These items are created lazily.
while (!m_scriptControllersWithWindowShells.isEmpty())
(*m_scriptControllersWithWindowShells.begin())->destroyWindowShell(this);
(*m_scriptControllersWithWindowShells.begin())->destroyWindowShell(*this);
}
void DOMWrapperWorld::clearWrappers()
......@@ -57,20 +57,20 @@ void DOMWrapperWorld::clearWrappers()
// These items are created lazily.
while (!m_scriptControllersWithWindowShells.isEmpty())
(*m_scriptControllersWithWindowShells.begin())->destroyWindowShell(this);
(*m_scriptControllersWithWindowShells.begin())->destroyWindowShell(*this);
}
DOMWrapperWorld* normalWorld(JSC::VM& vm)
DOMWrapperWorld& normalWorld(JSC::VM& vm)
{
VM::ClientData* clientData = vm.clientData;
ASSERT(clientData);
return static_cast<WebCoreJSClientData*>(clientData)->normalWorld();
}
DOMWrapperWorld* mainThreadNormalWorld()
DOMWrapperWorld& mainThreadNormalWorld()
{
ASSERT(isMainThread());
static DOMWrapperWorld* cachedNormalWorld = normalWorld(*JSDOMWindow::commonVM());
static DOMWrapperWorld& cachedNormalWorld = normalWorld(*JSDOMWindow::commonVM());
return cachedNormalWorld;
}
......
......@@ -67,12 +67,12 @@ private:
bool m_isNormal;
};
DOMWrapperWorld* normalWorld(JSC::VM&);
DOMWrapperWorld* mainThreadNormalWorld();
inline DOMWrapperWorld* debuggerWorld() { return mainThreadNormalWorld(); }
inline DOMWrapperWorld* pluginWorld() { return mainThreadNormalWorld(); }
DOMWrapperWorld& normalWorld(JSC::VM&);
DOMWrapperWorld& mainThreadNormalWorld();
inline DOMWrapperWorld& debuggerWorld() { return mainThreadNormalWorld(); }
inline DOMWrapperWorld& pluginWorld() { return mainThreadNormalWorld(); }
inline DOMWrapperWorld* currentWorld(JSC::ExecState* exec)
inline DOMWrapperWorld& currentWorld(JSC::ExecState* exec)
{
return JSC::jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->world();
}
......
......@@ -371,7 +371,7 @@ JSValue JSCSSStyleDeclaration::getPropertyCSSValue(ExecState* exec)
if (!cssValue)
return jsNull();
currentWorld(exec)->m_cssValueRoots.add(cssValue.get(), root(impl())); // Balanced by JSCSSValueOwner::finalize().
currentWorld(exec).m_cssValueRoots.add(cssValue.get(), root(impl())); // Balanced by JSCSSValueOwner::finalize().
return toJS(exec, globalObject(), WTF::getPtr(cssValue));
}
......
......@@ -70,8 +70,8 @@ bool JSCSSValueOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handl
void JSCSSValueOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
JSCSSValue* jsCSSValue = jsCast<JSCSSValue*>(handle.get().asCell());
DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
world->m_cssValueRoots.remove(jsCSSValue->impl());
DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
world.m_cssValueRoots.remove(jsCSSValue->impl());
uncacheWrapper(world, jsCSSValue->impl(), jsCSSValue);
jsCSSValue->releaseImpl();
}
......
......@@ -112,87 +112,87 @@ class DOMStringList;
return JSC::jsCast<JSC::JSObject*>(asObject(getDOMStructure<WrapperClass>(vm, JSC::jsCast<JSDOMGlobalObject*>(globalObject))->storedPrototype()));
}
inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld* world, JSC::ArrayBuffer*)
inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld& world, JSC::ArrayBuffer*)
{
return static_cast<WebCoreTypedArrayController*>(world->vm()->m_typedArrayController.get())->wrapperOwner();
return static_cast<WebCoreTypedArrayController*>(world.vm()->m_typedArrayController.get())->wrapperOwner();
}
inline void* wrapperContext(DOMWrapperWorld* world, JSC::ArrayBuffer*)
inline void* wrapperContext(DOMWrapperWorld& world, JSC::ArrayBuffer*)
{
return world;
return &world;
}
inline JSDOMWrapper* getInlineCachedWrapper(DOMWrapperWorld*, void*) { return 0; }
inline bool setInlineCachedWrapper(DOMWrapperWorld*, void*, JSDOMWrapper*, JSC::WeakHandleOwner*, void*) { return false; }
inline bool clearInlineCachedWrapper(DOMWrapperWorld*, void*, JSDOMWrapper*) { return false; }
inline JSDOMWrapper* getInlineCachedWrapper(DOMWrapperWorld&, void*) { return 0; }
inline bool setInlineCachedWrapper(DOMWrapperWorld&, void*, JSDOMWrapper*, JSC::WeakHandleOwner*, void*) { return false; }
inline bool clearInlineCachedWrapper(DOMWrapperWorld&, void*, JSDOMWrapper*) { return false; }
inline JSDOMWrapper* getInlineCachedWrapper(DOMWrapperWorld* world, ScriptWrappable* domObject)
inline JSDOMWrapper* getInlineCachedWrapper(DOMWrapperWorld& world, ScriptWrappable* domObject)
{
if (!world->isNormal())
if (!world.isNormal())
return 0;
return domObject->wrapper();
}
inline JSC::JSArrayBuffer* getInlineCachedWrapper(DOMWrapperWorld* world, JSC::ArrayBuffer* buffer)
inline JSC::JSArrayBuffer* getInlineCachedWrapper(DOMWrapperWorld& world, JSC::ArrayBuffer* buffer)
{
if (!world->isNormal())
if (!world.isNormal())
return 0;
return buffer->m_wrapper.get();
}
inline bool setInlineCachedWrapper(DOMWrapperWorld* world, ScriptWrappable* domObject, JSDOMWrapper* wrapper, JSC::WeakHandleOwner* wrapperOwner, void* context)
inline bool setInlineCachedWrapper(DOMWrapperWorld& world, ScriptWrappable* domObject, JSDOMWrapper* wrapper, JSC::WeakHandleOwner* wrapperOwner, void* context)
{
if (!world->isNormal())
if (!world.isNormal())
return false;
domObject->setWrapper(wrapper, wrapperOwner, context);
return true;
}
inline bool setInlineCachedWrapper(DOMWrapperWorld* world, JSC::ArrayBuffer* domObject, JSC::JSArrayBuffer* wrapper, JSC::WeakHandleOwner* wrapperOwner, void* context)
inline bool setInlineCachedWrapper(DOMWrapperWorld& world, JSC::ArrayBuffer* domObject, JSC::JSArrayBuffer* wrapper, JSC::WeakHandleOwner* wrapperOwner, void* context)
{
if (!world->isNormal())
if (!world.isNormal())
return false;
domObject->m_wrapper = JSC::Weak<JSC::JSArrayBuffer>(wrapper, wrapperOwner, context);
return true;
}
inline bool clearInlineCachedWrapper(DOMWrapperWorld* world, ScriptWrappable* domObject, JSDOMWrapper* wrapper)
inline bool clearInlineCachedWrapper(DOMWrapperWorld& world, ScriptWrappable* domObject, JSDOMWrapper* wrapper)
{
if (!world->isNormal())
if (!world.isNormal())
return false;
domObject->clearWrapper(wrapper);
return true;
}
inline bool clearInlineCachedWrapper(DOMWrapperWorld* world, JSC::ArrayBuffer* domObject, JSC::JSArrayBuffer* wrapper)
inline bool clearInlineCachedWrapper(DOMWrapperWorld& world, JSC::ArrayBuffer* domObject, JSC::JSArrayBuffer* wrapper)
{
if (!world->isNormal())
if (!world.isNormal())
return false;
weakClear(domObject->m_wrapper, wrapper);
return true;
}
template <typename DOMClass> inline JSC::JSObject* getCachedWrapper(DOMWrapperWorld* world, DOMClass* domObject)
template <typename DOMClass> inline JSC::JSObject* getCachedWrapper(DOMWrapperWorld& world, DOMClass* domObject)
{
if (JSC::JSObject* wrapper = getInlineCachedWrapper(world, domObject))
return wrapper;
return world->m_wrappers.get(domObject);
return world.m_wrappers.get(domObject);
}
template <typename DOMClass, typename WrapperClass> inline void cacheWrapper(DOMWrapperWorld* world, DOMClass* domObject, WrapperClass* wrapper)
template <typename DOMClass, typename WrapperClass> inline void cacheWrapper(DOMWrapperWorld& world, DOMClass* domObject, WrapperClass* wrapper)
{
JSC::WeakHandleOwner* owner = wrapperOwner(world, domObject);
void* context = wrapperContext(world, domObject);
if (setInlineCachedWrapper(world, domObject, wrapper, owner, context))
return;
weakAdd(world->m_wrappers, (void*)domObject, JSC::Weak<JSC::JSObject>(wrapper, owner, context));
weakAdd(world.m_wrappers, (void*)domObject, JSC::Weak<JSC::JSObject>(wrapper, owner, context));
}
template <typename DOMClass, typename WrapperClass> inline void uncacheWrapper(DOMWrapperWorld* world, DOMClass* domObject, WrapperClass* wrapper)
template <typename DOMClass, typename WrapperClass> inline void uncacheWrapper(DOMWrapperWorld& world, DOMClass* domObject, WrapperClass* wrapper)
{
if (clearInlineCachedWrapper(world, domObject, wrapper))
return;
weakRemove(world->m_wrappers, (void*)domObject, wrapper);
weakRemove(world.m_wrappers, (void*)domObject, wrapper);
}
#define CREATE_DOM_WRAPPER(exec, globalObject, className, object) createWrapper<JS##className>(exec, globalObject, static_cast<className*>(object))
......@@ -577,7 +577,7 @@ class DOMStringList;
}
}
JSStringCache& stringCache = currentWorld(exec)->m_stringCache;
JSStringCache& stringCache = currentWorld(exec).m_stringCache;
JSStringCache::AddResult addResult = stringCache.add(stringImpl, nullptr);
if (addResult.isNewEntry)
addResult.iterator->value = JSC::jsString(exec, String(stringImpl));
......
......@@ -47,6 +47,7 @@ JSDOMGlobalObject::JSDOMGlobalObject(VM& vm, Structure* structure, PassRefPtr<DO
, m_currentEvent(0)
, m_world(world)
{
ASSERT(m_world);
}
void JSDOMGlobalObject::destroy(JSCell* cell)
......@@ -124,12 +125,12 @@ JSDOMGlobalObject* toJSDOMGlobalObject(ScriptExecutionContext* scriptExecutionCo
return 0;
}
JSDOMGlobalObject* toJSDOMGlobalObject(Document* document, DOMWrapperWorld* world)
JSDOMGlobalObject* toJSDOMGlobalObject(Document* document, DOMWrapperWorld& world)
{
return toJSDOMWindow(document->frame(), world);
}
JSDOMGlobalObject* toJSDOMGlobalObject(ScriptExecutionContext* scriptExecutionContext, DOMWrapperWorld* world)
JSDOMGlobalObject* toJSDOMGlobalObject(ScriptExecutionContext* scriptExecutionContext, DOMWrapperWorld& world)
{
if (scriptExecutionContext->isDocument())
return toJSDOMGlobalObject(toDocument(scriptExecutionContext), world);
......
......@@ -65,10 +65,11 @@ namespace WebCore {
static void visitChildren(JSC::JSCell*, JSC::SlotVisitor&);
DOMWrapperWorld* world() { return m_world.get(); }
DOMWrapperWorld& world() { return *m_world; }
protected:
static WEBKIT_EXPORTDATA const JSC::ClassInfo s_info;
public:
static const JSC::ClassInfo* info() { return &s_info; }
......@@ -100,8 +101,8 @@ namespace WebCore {
JSDOMGlobalObject* toJSDOMGlobalObject(Document*, JSC::ExecState*);
JSDOMGlobalObject* toJSDOMGlobalObject(ScriptExecutionContext*, JSC::ExecState*);
JSDOMGlobalObject* toJSDOMGlobalObject(Document*, DOMWrapperWorld*);
JSDOMGlobalObject* toJSDOMGlobalObject(ScriptExecutionContext*, DOMWrapperWorld*);
JSDOMGlobalObject* toJSDOMGlobalObject(Document*, DOMWrapperWorld&);
JSDOMGlobalObject* toJSDOMGlobalObject(ScriptExecutionContext*, DOMWrapperWorld&);
} // namespace WebCore
......
......@@ -54,7 +54,7 @@ const ClassInfo JSDOMWindowBase::s_info = { "Window", &JSDOMGlobalObject::s_info
const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, &queueTaskToEventLoop };
JSDOMWindowBase::JSDOMWindowBase(VM& vm, Structure* structure, PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
: JSDOMGlobalObject(vm, structure, shell->world(), &s_globalObjectMethodTable)
: JSDOMGlobalObject(vm, structure, &shell->world(), &s_globalObjectMethodTable)
, m_impl(window)
, m_shell(shell)
{
......@@ -212,7 +212,7 @@ JSValue toJS(ExecState* exec, DOMWindow* domWindow)
return frame->script().windowShell(currentWorld(exec));
}
JSDOMWindow* toJSDOMWindow(Frame* frame, DOMWrapperWorld* world)
JSDOMWindow* toJSDOMWindow(Frame* frame, DOMWrapperWorld& world)
{
if (!frame)
return 0;
......
......@@ -85,7 +85,7 @@ namespace WebCore {
JSC::JSValue toJS(JSC::ExecState*, DOMWindow*);
// Returns JSDOMWindow or 0
JSDOMWindow* toJSDOMWindow(Frame*, DOMWrapperWorld*);
JSDOMWindow* toJSDOMWindow(Frame*, DOMWrapperWorld&);
JSDOMWindow* toJSDOMWindow(JSC::JSValue);
} // namespace WebCore
......
......@@ -43,9 +43,9 @@ namespace WebCore {
const ClassInfo JSDOMWindowShell::s_info = { "JSDOMWindowShell", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSDOMWindowShell) };
JSDOMWindowShell::JSDOMWindowShell(Structure* structure, DOMWrapperWorld* world)
: Base(*world->vm(), structure)
, m_world(world)
JSDOMWindowShell::JSDOMWindowShell(VM& vm, Structure* structure, DOMWrapperWorld& world)
: Base(vm, structure)
, m_world(&world)
{
}
......@@ -61,11 +61,11 @@ void JSDOMWindowShell::destroy(JSCell* cell)
static_cast<JSDOMWindowShell*>(cell)->JSDOMWindowShell::~JSDOMWindowShell();
}
void JSDOMWindowShell::setWindow(JSC::VM& vm, JSDOMWindow* window)
void JSDOMWindowShell::setWindow(VM& vm, JSDOMWindow* window)
{
ASSERT_ARG(window, window);
setTarget(vm, window);
structure()->setGlobalObject(*JSDOMWindow::commonVM(), window);
structure()->setGlobalObject(vm, window);
gcController().garbageCollectSoon();
}
......@@ -77,13 +77,15 @@ void JSDOMWindowShell::setWindow(PassRefPtr<DOMWindow> domWindow)
// Explicitly protect the global object's prototype so it isn't collected
// when we allocate the global object. (Once the global object is fully
// constructed, it can mark its own prototype.)
Structure* prototypeStructure = JSDOMWindowPrototype::createStructure(*JSDOMWindow::commonVM(), 0, jsNull());
Strong<JSDOMWindowPrototype> prototype(*JSDOMWindow::commonVM(), JSDOMWindowPrototype::create(*JSDOMWindow::commonVM(), 0, prototypeStructure));
Structure* structure = JSDOMWindow::createStructure(*JSDOMWindow::commonVM(), 0, prototype.get());
JSDOMWindow* jsDOMWindow = JSDOMWindow::create(*JSDOMWindow::commonVM(), structure, domWindow, this);
prototype->structure()->setGlobalObject(*JSDOMWindow::commonVM(), jsDOMWindow);
setWindow(*JSDOMWindow::commonVM(), jsDOMWindow);
VM& vm = *JSDOMWindow::commonVM();
Structure* prototypeStructure = JSDOMWindowPrototype::createStructure(vm, 0, jsNull());
Strong<JSDOMWindowPrototype> prototype(vm, JSDOMWindowPrototype::create(vm, 0, prototypeStructure));
Structure* structure = JSDOMWindow::createStructure(vm, 0, prototype.get());
JSDOMWindow* jsDOMWindow = JSDOMWindow::create(vm, structure, domWindow, this);
prototype->structure()->setGlobalObject(vm, jsDOMWindow);
setWindow(vm, jsDOMWindow);
ASSERT(jsDOMWindow->globalObject() == jsDOMWindow);
ASSERT(prototype->globalObject() == jsDOMWindow);
}
......@@ -108,11 +110,11 @@ JSValue toJS(ExecState* exec, Frame* frame)
return frame->script().windowShell(currentWorld(exec));
}
JSDOMWindowShell* toJSDOMWindowShell(Frame* frame, DOMWrapperWorld* isolatedWorld)
JSDOMWindowShell* toJSDOMWindowShell(Frame* frame, DOMWrapperWorld& world)
{
if (!frame)
return 0;
return frame->script().windowShell(isolatedWorld);
return frame->script().windowShell(world);
}
} // namespace WebCore
......@@ -40,7 +40,6 @@ namespace WebCore {
class JSDOMWindowShell : public JSC::JSProxy {
typedef JSC::JSProxy Base;
public:
JSDOMWindowShell(PassRefPtr<DOMWindow>, JSC::Structure*, DOMWrapperWorld*);
static void destroy(JSCell*);
JSDOMWindow* window() const { return JSC::jsCast<JSDOMWindow*>(target()); }
......@@ -51,11 +50,10 @@ namespace WebCore {
DOMWindow* impl() const;
static JSDOMWindowShell* create(PassRefPtr<DOMWindow> window, JSC::Structure* structure, DOMWrapperWorld* world)