Title: [166411] trunk/Source/WebCore
Revision
166411
Author
[email protected]
Date
2014-03-28 10:02:40 -0700 (Fri, 28 Mar 2014)

Log Message

Inline JSDOMWrapper subclasses' finishCreation().
<https://webkit.org/b/130890>

finishCreation() is really a no-op for JSDOMWrapper subclasses in
release builds. None of the ancestor classes do anything but assert
in their implementations.

Generate the function inline, reducing binary size, and removing
an unnecessary call from the JSFoo::create() helpers.

Reviewed by Sam Weinig.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (166410 => 166411)


--- trunk/Source/WebCore/ChangeLog	2014-03-28 16:42:02 UTC (rev 166410)
+++ trunk/Source/WebCore/ChangeLog	2014-03-28 17:02:40 UTC (rev 166411)
@@ -1,3 +1,21 @@
+2014-03-28  Andreas Kling  <[email protected]>
+
+        Inline JSDOMWrapper subclasses' finishCreation().
+        <https://webkit.org/b/130890>
+
+        finishCreation() is really a no-op for JSDOMWrapper subclasses in
+        release builds. None of the ancestor classes do anything but assert
+        in their implementations.
+
+        Generate the function inline, reducing binary size, and removing
+        an unnecessary call from the JSFoo::create() helpers.
+
+        Reviewed by Sam Weinig.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        (GenerateImplementation):
+
 2014-03-28  Jer Noble  <[email protected]>
 
         [Mac] HLS streams will report an incorrect natural size.

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (166410 => 166411)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2014-03-28 16:42:02 UTC (rev 166410)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2014-03-28 17:02:40 UTC (rev 166411)
@@ -1102,8 +1102,13 @@
     } elsif ($codeGenerator->InheritsInterface($interface, "WorkerGlobalScope")) {
         push(@headerContent, "    $className(JSC::VM&, JSC::Structure*, PassRefPtr<$implType>);\n");
     } else {
-        push(@headerContent, "    $className(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<$implType>);\n");
-        push(@headerContent, "    void finishCreation(JSC::VM&);\n");
+        push(@headerContent, "    $className(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<$implType>);\n\n");
+        push(@headerContent, "    void finishCreation(JSC::VM& vm)\n");
+        push(@headerContent, "    {\n");
+        push(@headerContent, "        Base::finishCreation(vm);\n");
+        push(@headerContent, "        ASSERT(inherits(info()));\n");
+        push(@headerContent, "    }\n\n");
+
     }
 
     # structure flags
@@ -1994,12 +1999,6 @@
         }
         push(@implContent, "{\n");
         push(@implContent, "}\n\n");
-
-        push(@implContent, "void ${className}::finishCreation(VM& vm)\n");
-        push(@implContent, "{\n");
-        push(@implContent, "    Base::finishCreation(vm);\n");
-        push(@implContent, "    ASSERT(inherits(info()));\n");
-        push(@implContent, "}\n\n");
     }
 
     unless (IsDOMGlobalObject($interface)) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to