Title: [133734] trunk/Source/WebCore
Revision
133734
Author
[email protected]
Date
2012-11-07 03:14:32 -0800 (Wed, 07 Nov 2012)

Log Message

[V8] Cleanup V8DOMWrapper::getCachedWrapper
https://bugs.webkit.org/show_bug.cgi?id=100853

Patch by Dan Carney <[email protected]> on 2012-11-07
Reviewed by Adam Barth.

Slight cleanup. Removed redundant branch.

No new tests. No change in functionality.

* bindings/v8/V8DOMWrapper.h:
(WebCore::V8DOMWrapper::getCachedWrapper):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (133733 => 133734)


--- trunk/Source/WebCore/ChangeLog	2012-11-07 10:22:41 UTC (rev 133733)
+++ trunk/Source/WebCore/ChangeLog	2012-11-07 11:14:32 UTC (rev 133734)
@@ -1,3 +1,17 @@
+2012-11-07  Dan Carney  <[email protected]>
+
+        [V8] Cleanup V8DOMWrapper::getCachedWrapper
+        https://bugs.webkit.org/show_bug.cgi?id=100853
+
+        Reviewed by Adam Barth.
+
+        Slight cleanup. Removed redundant branch.
+
+        No new tests. No change in functionality.
+
+        * bindings/v8/V8DOMWrapper.h:
+        (WebCore::V8DOMWrapper::getCachedWrapper):
+
 2012-11-07  Simon Hausmann  <[email protected]>
 
         [Qt] Unreviewed trivial build fix adapting to QtMultimedia API changes

Modified: trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h (133733 => 133734)


--- trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h	2012-11-07 10:22:41 UTC (rev 133733)
+++ trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h	2012-11-07 11:14:32 UTC (rev 133734)
@@ -116,19 +116,14 @@
         static v8::Handle<v8::Object> getCachedWrapper(Node* node)
         {
             ASSERT(isMainThread());
-            if (LIKELY(!DOMWrapperWorld::isolatedWorldsExist())) {
-                v8::Persistent<v8::Object> wrapper = node->wrapper();
-                if (LIKELY(!wrapper.IsEmpty()))
-                    return wrapper;
-            }
+            if (LIKELY(!DOMWrapperWorld::isolatedWorldsExist()))
+                return node->wrapper();
 
             V8DOMWindowShell* context = V8DOMWindowShell::getEntered();
             if (LIKELY(!context))
                 return node->wrapper();
 
-            DOMDataStore* store = context->world()->domDataStore();
-            DOMWrapperMap<Node>& domNodeMap = store->domNodeMap();
-            return domNodeMap.get(node);
+            return context->world()->domDataStore()->domNodeMap().get(node);
         }
 
     private:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to