Title: [144587] trunk/Source/WebCore
Revision
144587
Author
[email protected]
Date
2013-03-03 16:05:48 -0800 (Sun, 03 Mar 2013)

Log Message

[V8] Rename getWorld() to isolatedWorld(), and getWorldForEnteredContext() to isolatedWorldForEnteredContext()
https://bugs.webkit.org/show_bug.cgi?id=111212

Reviewed by Adam Barth.

The rename I did in r142424 was wrong. Given that getWorld() returns 0
for the main world, it should be named isolatedWorld(). Similarly,
given that getWorldForEnteredContext() returns 0 for the main world,
it should be named isolatedWorldForEnteredContext().

No tests. No change in behavior.

* bindings/v8/CustomElementHelpers.cpp:
(WebCore::CustomElementHelpers::isFeatureAllowed):
* bindings/v8/DOMDataStore.cpp:
(WebCore::DOMDataStore::current):
* bindings/v8/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::makeContextWeak):
* bindings/v8/DOMWrapperWorld.h:
(WebCore::DOMWrapperWorld::isolatedWorld):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
(WebCore::ScriptController::currentWorldContext):
* bindings/v8/V8Binding.h:
(WebCore::isolatedWorldForEnteredContext):
* bindings/v8/WorldContextHandle.cpp:
(WebCore::WorldContextHandle::WorldContextHandle):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8SVGDocumentCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::constructorCustom):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (144586 => 144587)


--- trunk/Source/WebCore/ChangeLog	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/ChangeLog	2013-03-04 00:05:48 UTC (rev 144587)
@@ -1,5 +1,44 @@
 2013-03-01  Kentaro Hara  <[email protected]>
 
+        [V8] Rename getWorld() to isolatedWorld(), and getWorldForEnteredContext() to isolatedWorldForEnteredContext()
+        https://bugs.webkit.org/show_bug.cgi?id=111212
+
+        Reviewed by Adam Barth.
+
+        The rename I did in r142424 was wrong. Given that getWorld() returns 0
+        for the main world, it should be named isolatedWorld(). Similarly,
+        given that getWorldForEnteredContext() returns 0 for the main world,
+        it should be named isolatedWorldForEnteredContext().
+
+        No tests. No change in behavior.
+
+        * bindings/v8/CustomElementHelpers.cpp:
+        (WebCore::CustomElementHelpers::isFeatureAllowed):
+        * bindings/v8/DOMDataStore.cpp:
+        (WebCore::DOMDataStore::current):
+        * bindings/v8/DOMWrapperWorld.cpp:
+        (WebCore::DOMWrapperWorld::makeContextWeak):
+        * bindings/v8/DOMWrapperWorld.h:
+        (WebCore::DOMWrapperWorld::isolatedWorld):
+        * bindings/v8/ScriptController.cpp:
+        (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
+        (WebCore::ScriptController::currentWorldContext):
+        * bindings/v8/V8Binding.h:
+        (WebCore::isolatedWorldForEnteredContext):
+        * bindings/v8/WorldContextHandle.cpp:
+        (WebCore::WorldContextHandle::WorldContextHandle):
+        * bindings/v8/custom/V8DocumentCustom.cpp:
+        (WebCore::wrap):
+        * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+        (WebCore::wrap):
+        * bindings/v8/custom/V8SVGDocumentCustom.cpp:
+        (WebCore::wrap):
+        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+        (WebCore::V8XMLHttpRequest::constructorCustom):
+
+2013-03-01  Kentaro Hara  <[email protected]>
+
+<<<<<<< HEAD
         [V8] Move HTMLDocument::getNamedProperty() to DOMWindowShell
         https://bugs.webkit.org/show_bug.cgi?id=111223
 
@@ -17,7 +56,44 @@
         (WebCore):
         (WebCore::getter):
         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+=======
+        [V8] Rename getWorld() to isolatedWorld(), and getWorldForEnteredContext() to isolatedWorldForEnteredContext()
+        https://bugs.webkit.org/show_bug.cgi?id=111212
 
+        Reviewed by Adam Barth.
+
+        The rename I did in r142424 was wrong. Given that getWorld() returns 0
+        for the main world, it should be named isolatedWorld(). Similarly,
+        given that getWorldForEnteredContext() returns 0 for the main world,
+        it should be named isolatedWorldForEnteredContext().
+
+        No tests. No change in behavior.
+
+        * bindings/v8/CustomElementHelpers.cpp:
+        (WebCore::CustomElementHelpers::isFeatureAllowed):
+        * bindings/v8/DOMDataStore.cpp:
+        (WebCore::DOMDataStore::current):
+        * bindings/v8/DOMWrapperWorld.cpp:
+        (WebCore::DOMWrapperWorld::makeContextWeak):
+        * bindings/v8/DOMWrapperWorld.h:
+        (WebCore::DOMWrapperWorld::isolatedWorld):
+        * bindings/v8/ScriptController.cpp:
+        (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
+        (WebCore::ScriptController::currentWorldContext):
+        * bindings/v8/V8Binding.h:
+        (WebCore::isolatedWorldForEnteredContext):
+        * bindings/v8/WorldContextHandle.cpp:
+        (WebCore::WorldContextHandle::WorldContextHandle):
+        * bindings/v8/custom/V8DocumentCustom.cpp:
+        (WebCore::wrap):
+        * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+        (WebCore::wrap):
+        * bindings/v8/custom/V8SVGDocumentCustom.cpp:
+        (WebCore::wrap):
+        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+        (WebCore::V8XMLHttpRequest::constructorCustom):
+>>>>>>> temp
+
 2013-03-03  Dan Bernstein  <[email protected]>
 
         Build fix after r144565. Reverted r144533.

Modified: trunk/Source/WebCore/bindings/v8/CustomElementHelpers.cpp (144586 => 144587)


--- trunk/Source/WebCore/bindings/v8/CustomElementHelpers.cpp	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/bindings/v8/CustomElementHelpers.cpp	2013-03-04 00:05:48 UTC (rev 144587)
@@ -115,7 +115,7 @@
 
 bool CustomElementHelpers::isFeatureAllowed(v8::Handle<v8::Context> context)
 {
-    if (DOMWrapperWorld* world = DOMWrapperWorld::getWorld(context))
+    if (DOMWrapperWorld* world = DOMWrapperWorld::isolatedWorld(context))
         return world->isMainWorld();
     return true;
 }

Modified: trunk/Source/WebCore/bindings/v8/DOMDataStore.cpp (144586 => 144587)


--- trunk/Source/WebCore/bindings/v8/DOMDataStore.cpp	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/bindings/v8/DOMDataStore.cpp	2013-03-04 00:05:48 UTC (rev 144587)
@@ -66,7 +66,7 @@
         return data->domDataStore();
 
     if (DOMWrapperWorld::isolatedWorldsExist()) {
-        DOMWrapperWorld* isolatedWorld = DOMWrapperWorld::getWorld(v8::Context::GetEntered());
+        DOMWrapperWorld* isolatedWorld = DOMWrapperWorld::isolatedWorld(v8::Context::GetEntered());
         if (UNLIKELY(!!isolatedWorld))
             return isolatedWorld->isolatedWorldDOMDataStore();
     }

Modified: trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp (144586 => 144587)


--- trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp	2013-03-04 00:05:48 UTC (rev 144587)
@@ -85,7 +85,7 @@
 void DOMWrapperWorld::makeContextWeak(v8::Handle<v8::Context> context)
 {
     ASSERT(isIsolatedWorld());
-    ASSERT(getWorld(context) == this);
+    ASSERT(isolatedWorld(context) == this);
     v8::Isolate* isolate = context->GetIsolate();
     v8::Persistent<v8::Context>::New(isolate, context).MakeWeak(isolate, this, isolatedWorldWeakCallback);
     // Matching deref is in weak callback.

Modified: trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h (144586 => 144587)


--- trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h	2013-03-04 00:05:48 UTC (rev 144587)
@@ -63,7 +63,7 @@
     void setIsolatedWorldField(v8::Handle<v8::Context>);
 
     static void assertContextHasCorrectPrototype(v8::Handle<v8::Context>);
-    static DOMWrapperWorld* getWorld(v8::Handle<v8::Context> context)
+    static DOMWrapperWorld* isolatedWorld(v8::Handle<v8::Context> context)
     {
         assertContextHasCorrectPrototype(context);
         return static_cast<DOMWrapperWorld*>(context->GetAlignedPointerFromEmbedderData(v8ContextIsolatedWorld));

Modified: trunk/Source/WebCore/bindings/v8/ScriptController.cpp (144586 => 144587)


--- trunk/Source/WebCore/bindings/v8/ScriptController.cpp	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/bindings/v8/ScriptController.cpp	2013-03-04 00:05:48 UTC (rev 144587)
@@ -419,7 +419,7 @@
 
 bool ScriptController::shouldBypassMainWorldContentSecurityPolicy()
 {
-    if (DOMWrapperWorld* world = worldForEnteredContext())
+    if (DOMWrapperWorld* world = isolatedWorldForEnteredContext())
         return world->isolatedWorldHasContentSecurityPolicy();
     return false;
 }
@@ -447,7 +447,7 @@
         return contextForWorld(this, mainThreadNormalWorld());
 
     v8::Handle<v8::Context> context = v8::Context::GetEntered();
-    DOMWrapperWorld* isolatedWorld = DOMWrapperWorld::getWorld(context);
+    DOMWrapperWorld* isolatedWorld = DOMWrapperWorld::isolatedWorld(context);
     if (!isolatedWorld)
         return contextForWorld(this, mainThreadNormalWorld());
 

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (144586 => 144587)


--- trunk/Source/WebCore/bindings/v8/V8Binding.h	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h	2013-03-04 00:05:48 UTC (rev 144587)
@@ -451,12 +451,12 @@
     // a context, if the window is currently being displayed in the Frame.
     Frame* toFrameIfNotDetached(v8::Handle<v8::Context>);
 
-    inline DOMWrapperWorld* worldForEnteredContext()
+    inline DOMWrapperWorld* isolatedWorldForEnteredContext()
     {
         v8::Handle<v8::Context> context = v8::Context::GetEntered();
         if (context.IsEmpty())
             return 0;
-        return DOMWrapperWorld::getWorld(context);
+        return DOMWrapperWorld::isolatedWorld(context);
     }
 
     // If the current context causes out of memory, _javascript_ setting

Modified: trunk/Source/WebCore/bindings/v8/WorldContextHandle.cpp (144586 => 144587)


--- trunk/Source/WebCore/bindings/v8/WorldContextHandle.cpp	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/bindings/v8/WorldContextHandle.cpp	2013-03-04 00:05:48 UTC (rev 144587)
@@ -63,7 +63,7 @@
     }
 #endif
 
-    if (DOMWrapperWorld::getWorld(context)) {
+    if (DOMWrapperWorld::isolatedWorld(context)) {
         m_context = SharedPersistent<v8::Context>::create(context);
         return;
     }

Modified: trunk/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp (144586 => 144587)


--- trunk/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp	2013-03-04 00:05:48 UTC (rev 144587)
@@ -101,7 +101,7 @@
     v8::Handle<v8::Object> wrapper = V8Document::createWrapper(impl, creationContext, isolate);
     if (wrapper.IsEmpty())
         return wrapper;
-    if (!worldForEnteredContext()) {
+    if (!isolatedWorldForEnteredContext()) {
         if (Frame* frame = impl->frame())
             frame->script()->windowShell(mainThreadNormalWorld())->updateDocumentWrapper(wrapper);
     }

Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp (144586 => 144587)


--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp	2013-03-04 00:05:48 UTC (rev 144587)
@@ -150,7 +150,7 @@
     v8::Handle<v8::Object> wrapper = V8HTMLDocument::createWrapper(impl, creationContext, isolate);
     if (wrapper.IsEmpty())
         return wrapper;
-    if (!worldForEnteredContext()) {
+    if (!isolatedWorldForEnteredContext()) {
         if (Frame* frame = impl->frame())
             frame->script()->windowShell(mainThreadNormalWorld())->updateDocumentWrapper(wrapper);
     }

Modified: trunk/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp (144586 => 144587)


--- trunk/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp	2013-03-04 00:05:48 UTC (rev 144587)
@@ -44,7 +44,7 @@
     v8::Handle<v8::Object> wrapper = V8SVGDocument::createWrapper(impl, creationContext, isolate);
     if (wrapper.IsEmpty())
         return wrapper;
-    if (!worldForEnteredContext()) {
+    if (!isolatedWorldForEnteredContext()) {
         if (Frame* frame = impl->frame())
             frame->script()->windowShell(mainThreadNormalWorld())->updateDocumentWrapper(wrapper);
     }

Modified: trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp (144586 => 144587)


--- trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp	2013-03-03 23:56:10 UTC (rev 144586)
+++ trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp	2013-03-04 00:05:48 UTC (rev 144587)
@@ -54,7 +54,7 @@
 
     RefPtr<SecurityOrigin> securityOrigin;
     if (context->isDocument()) {
-        if (DOMWrapperWorld* world = worldForEnteredContext())
+        if (DOMWrapperWorld* world = isolatedWorldForEnteredContext())
             securityOrigin = world->isolatedWorldSecurityOrigin();
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to