Bug 127226 - [CodeGeneratorJS] Sort output of StructureFlags and function parameters
Summary: [CodeGeneratorJS] Sort output of StructureFlags and function parameters
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: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-18 10:29 PST by Alberto Garcia
Modified: 2014-01-18 15:26 PST (History)
8 users (show)

See Also:


Attachments
Patch (17.18 KB, patch)
2014-01-18 10:32 PST, Alberto Garcia
no flags Details | Formatted Diff | Diff
Patch (18.75 KB, patch)
2014-01-18 11:33 PST, Alberto Garcia
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Garcia 2014-01-18 10:29:29 PST
We're using the following code to create StructureFlags:

   foreach my $structureFlag (keys %structureFlags) {
       push(@headerContent, $structureFlag . " | ");
   }

The problem is that keys %structureFlags returns a list in an
unspecified order, which can change between Perl versions and is
indeed making the bindings tests fail in one of the GTK+ bots:


PASS: (JS) JSTestException.cpp
FAIL: (JS) JSTestException.h
--- WebCore/bindings/scripts/test/JS/JSTestException.h	2014-01-17 06:05:06.759471284 -0800
+++ /tmp/tmpGfPzJ5/JSTestException.h	2014-01-18 01:22:50.056392293 -0800
@@ -67,7 +67,7 @@
 protected:
     JSTestException(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestException>);
     void finishCreation(JSC::VM&);
-    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Base::StructureFlags;
+    static const unsigned StructureFlags = JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
 };
 
 class JSTestExceptionOwner : public JSC::WeakHandleOwner {
Comment 1 Alberto Garcia 2014-01-18 10:32:24 PST
Created attachment 221557 [details]
Patch
Comment 2 Alberto Garcia 2014-01-18 11:30:00 PST
This also affects function parameters, I'll update the patch.
Comment 3 Alberto Garcia 2014-01-18 11:33:50 PST
Created attachment 221560 [details]
Patch
Comment 4 Alberto Garcia 2014-01-18 15:26:56 PST
Committed r162280: <http://trac.webkit.org/changeset/162280>