Bug 125940 - Refactor CodeGeneratorJS - Move attribute function creation out of getOwnPropertyName guard
Summary: Refactor CodeGeneratorJS - Move attribute function creation out of getOwnProp...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-18 12:38 PST by Oliver Hunt
Modified: 2013-12-18 13:05 PST (History)
2 users (show)

See Also:


Attachments
Patch (53.25 KB, patch)
2013-12-18 12:40 PST, Oliver Hunt
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2013-12-18 12:38:40 PST
Refactor CodeGeneratorJS - Move attribute function creation out of getOwnPropertyName guard
Comment 1 Oliver Hunt 2013-12-18 12:40:40 PST
Created attachment 219560 [details]
Patch
Comment 2 Oliver Hunt 2013-12-18 12:42:58 PST
diff ignoring whitespace changes:
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 5845836..c1efc95 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,5 +1,18 @@
 2013-12-18  Oliver Hunt  <oliver@apple.com>
 
+        Refactor CodeGeneratorJS - Move attribute function creation out of getOwnPropertyName guard
+        https://bugs.webkit.org/show_bug.cgi?id=125940
+
+        Reviewed by NOBODY (OOPS!).
+
+        This is just a huge block move of code out from behind the
+        ImplementationOverridesGetOwnProperty guard.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+
+2013-12-18  Oliver Hunt  <oliver@apple.com>
+
         Simplify bindings codegen for adding getOwnPropertySlot overrides
         https://bugs.webkit.org/show_bug.cgi?id=125934
 
diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
index dfbb5bd..43bde48 100644
--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -1874,6 +1874,7 @@ sub GenerateImplementation
             push(@implContent, "}\n\n");
         }
 
+    }
     if ($numAttributes > 0) {
         foreach my $attribute (@{$interface->attributes}) {
             my $name = $attribute->signature->name;
@@ -2066,7 +2067,7 @@ sub GenerateImplementation
             push(@implContent, "    return JSValue::encode(${className}::getConstructor(exec->vm(), domObject->globalObject()));\n");
             push(@implContent, "}\n\n");
         }
-        }
+
 
         # Check if we have any writable attributes
         my $hasReadWriteProperties = 0;
@@ -2287,6 +2288,7 @@ sub GenerateImplementation
                     }
                 }
             }
+        }
 
         if ($interface->extendedAttributes->{"ReplaceableConstructor"}) {
             my $constructorFunctionName = "setJS" . $interfaceName . "Constructor";
@@ -2312,7 +2314,6 @@ sub GenerateImplementation
             push(@implContent, "}\n\n");
         }
     }
-    }
 
     if ($indexedGetterFunction && !$interface->extendedAttributes->{"CustomEnumerateProperty"}) {
         push(@implContent, "void ${className}::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)\n");
Comment 3 Simon Fraser (smfr) 2013-12-18 13:04:13 PST
Comment on attachment 219560 [details]
Patch

rs=me
Comment 4 Oliver Hunt 2013-12-18 13:05:22 PST
Committed r160793: <http://trac.webkit.org/changeset/160793>