De-inline convertNodeToV8Object(), which expands to a lot of asm code and is inlined 136
authorsnej@chromium.org <snej@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Nov 2009 21:09:49 +0000 (21:09 +0000)
committersnej@chromium.org <snej@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Nov 2009 21:09:49 +0000 (21:09 +0000)
times in the generated V8 bindings.
https://bugs.webkit.org/show_bug.cgi?id=31368

Reviewed by Dimitri Glazkov.

* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::convertNodeToV8Object):  Moved body here from .h file
* bindings/v8/V8DOMWrapper.h:  Removed inline method body.

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

WebCore/ChangeLog
WebCore/bindings/v8/V8DOMWrapper.cpp
WebCore/bindings/v8/V8DOMWrapper.h

index 0e0e75d03562ab5747ab72b8eea0f9b57a24853b..34a5f2dbf8c9b945569fa57f3d633177b50b374a 100644 (file)
@@ -1,3 +1,15 @@
+2009-11-11  Jens Alfke  <snej@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        De-inline convertNodeToV8Object(), which expands to a lot of asm code and is inlined 136
+        times in the generated V8 bindings.
+        https://bugs.webkit.org/show_bug.cgi?id=31368
+
+        * bindings/v8/V8DOMWrapper.cpp:
+        (WebCore::V8DOMWrapper::convertNodeToV8Object):  Moved body here from .h file
+        * bindings/v8/V8DOMWrapper.h:  Removed inline method body.
+
 2009-11-11  Jessie Berlin  <jberlin@webkit.org>
 
         Reviewed by Timothy Hatcher.
index c908e665e19206286b81193dc65b21d4f5bdfbea..50e6351df69bc4026749ca6577250124defc47e5 100644 (file)
@@ -1305,6 +1305,23 @@ v8::Handle<v8::Value> V8DOMWrapper::convertDocumentToV8Object(Document* document
     return wrapper;
 }
 
+v8::Handle<v8::Value> V8DOMWrapper::convertNodeToV8Object(Node* node)
+{
+    if (!node)
+        return v8::Null();
+    
+    Document* document = node->document();
+    if (node == document)
+        return convertDocumentToV8Object(document);
+    
+    DOMWrapperMap<Node>& domNodeMap = getDOMNodeMap();
+    v8::Handle<v8::Object> wrapper = domNodeMap.get(node);
+    if (wrapper.IsEmpty())
+        return convertNewNodeToV8Object(node, 0, domNodeMap);
+    
+    return wrapper;
+}
+    
 // Caller checks node is not null.
 v8::Handle<v8::Value> V8DOMWrapper::convertNewNodeToV8Object(Node* node, V8Proxy* proxy, DOMWrapperMap<Node>& domNodeMap)
 {
index 9ba888f9d69b4aed72cda52f5a27cbc790c6b294..7ca2e63edcc7a2fde51c990332d19a345f4c3bc8 100644 (file)
@@ -147,22 +147,7 @@ namespace WebCore {
             return convertNodeToV8Object(node.get());
         }
 
-        static v8::Handle<v8::Value> convertNodeToV8Object(Node* node)
-        {
-            if (!node)
-                return v8::Null();
-
-            Document* document = node->document();
-            if (node == document)
-                return convertDocumentToV8Object(document);
-
-            DOMWrapperMap<Node>& domNodeMap = getDOMNodeMap();
-            v8::Handle<v8::Object> wrapper = domNodeMap.get(node);
-            if (wrapper.IsEmpty())
-                return convertNewNodeToV8Object(node, 0, domNodeMap);
-
-            return wrapper;
-        }
+        static v8::Handle<v8::Value> convertNodeToV8Object(Node*);
 
         static v8::Handle<v8::Value> convertDocumentToV8Object(Document*);