Depending on the WebIDL and options, the JSXXConstructor generated class declaration is changing. It may be useful to rationalize this so that it can be later templated, which would simplify the binding generator work.
Created attachment 262693 [details] Patch
(In reply to comment #1) > Created attachment 262693 [details] > Patch mac-wk2 compilation is failing for an unrelated reason, see bug 149751.
Comment on attachment 262693 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=262693&action=review > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4836 > + my $overloadedIndexString .= $function->{overloadedIndex}; I don’t understand the use of ".=" instead of "=" here. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:5021 > + push(@$outputArray, "#endif // $conditionalString\n"); I don’t think comments like this one are useful when the entire body of #if/#else/#endif is only 6 lines long. Especially in generated code that people should typically not be reading.
(In reply to comment #3) > Comment on attachment 262693 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=262693&action=review > > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4836 > > + my $overloadedIndexString .= $function->{overloadedIndex}; > > I don’t understand the use of ".=" instead of "=" here. Right. Let's also remove $overloadedIndexString at the same time. > > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:5021 > > + push(@$outputArray, "#endif // $conditionalString\n"); > > I don’t think comments like this one are useful when the entire body of > #if/#else/#endif is only 6 lines long. Especially in generated code that > people should typically not be reading. OK
Created attachment 262764 [details] Patch for landing
Comment on attachment 262764 [details] Patch for landing Clearing flags on attachment: 262764 Committed r190785: <http://trac.webkit.org/changeset/190785>
All reviewed patches have been landed. Closing bug.
Comment on attachment 262764 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=262764&action=review > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:5020 > - push(@$outputArray, "#if $conditionalString\n") if $conditionalString; > push(@$outputArray, "ConstructType ${constructorClassName}::getConstructData(JSCell*, ConstructData& constructData)\n"); > push(@$outputArray, "{\n"); > - push(@$outputArray, " constructData.native.function = construct${className};\n"); > - push(@$outputArray, " return ConstructTypeHost;\n"); > + if ($conditionalString) { > + push(@$outputArray, "#if $conditionalString\n"); > + push(@$outputArray, " constructData.native.function = construct;\n"); > + push(@$outputArray, " return ConstructTypeHost;\n"); > + push(@$outputArray, "#else\n"); > + push(@$outputArray, " return Base::getConstructData(cell, constructData);\n"); > + push(@$outputArray, "#endif\n"); The #else case causes build failure, because there is no cell named variable/argument here.
I'm going to fix this in bug149956.