Tidied up some DOMWrapperWorld lifetime issues.
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Apr 2010 23:16:16 +0000 (23:16 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Apr 2010 23:16:16 +0000 (23:16 +0000)
commit102db50973ee8f7a7dd363dcf8c8a02e7498816d
tree179bee56c070811ddb2cc5ce29a53a10b3abe5a9
parent5987d9aca01e7052800d474abb3de80b607600a1
Tidied up some DOMWrapperWorld lifetime issues.

Reviewed by Cameron Zwarich.

* bindings/js/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::DOMWrapperWorld): Made DOMWrapperWorld wholly
responsible for managing its presence in WebCoreJSClientData's world set.
This is simpler and more encapsulated than making its clients sometimes
responsible for managing that set and sometimes not.

* bindings/js/DOMWrapperWorld.h:
(WebCore::DOMWrapperWorld::create): Made isNormal default to false,
removing one of the reasons for the IsolatedWorld class to exist, so I
could remove that class.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonJSGlobalData): Used the work-around below.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::createWorld): Nixed IsolatedWorld, which is
now superfluous.

* bindings/js/WebCoreJSClientData.h:
(WebCore::initNormalWorldClientData): Added a work-around for the fact
that WebCoreJSClientData must be set as globalData->clientData before
the DOMWrapperWorld constructor runs. This removed the other reason
for the IsolatedWorld class to exist, so I could remove that class.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@57379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/bindings/js/DOMWrapperWorld.cpp
WebCore/bindings/js/DOMWrapperWorld.h
WebCore/bindings/js/JSDOMWindowBase.cpp
WebCore/bindings/js/ScriptController.cpp
WebCore/bindings/js/WebCoreJSClientData.h
WebCore/bindings/js/WorkerScriptController.cpp