Currently: - MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined) returns args[index]. - MAYBE_MISSING_PARAMETER(args, index, DefaultIsNullString) returns Local<Value>() if args[index] is missing (i.e. the length of |args| is less than |index|). It returns args[index] otherwise. No one other than CodeGeneratorV8.pm uses MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined). Instead, we simply use args[index]. We should remove the redundant usage in CodeGeneratorV8.pm too. The long-name macro has been making generated code less readable. In addition, we can rename MAYBE_MISSING_PARAMETER() to MissingIsNullString().
Created attachment 188488 [details] Patch
Comment on attachment 188488 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=188488&action=review > Source/WebCore/bindings/v8/V8BindingMacros.h:55 > +#define MissingIsNullString(args, index) \ Can we make this an inline function instead of a pre-processor macro? (If not, we should keep the ALL_CAPS name to let callers know that it's a macro.)
Created attachment 189004 [details] patch for landing
(In reply to comment #2) > Can we make this an inline function instead of a pre-processor macro? (If not, we should keep the ALL_CAPS name to let callers know that it's a macro.) Changed it to an inline function and renamed it to argumentOrNull(). Thanks.
Comment on attachment 189004 [details] patch for landing Clearing flags on attachment: 189004 Committed r143305: <http://trac.webkit.org/changeset/143305>
All reviewed patches have been landed. Closing bug.
(In reply to comment #5) > (From update of attachment 189004 [details]) > Clearing flags on attachment: 189004 > > Committed r143305: <http://trac.webkit.org/changeset/143305> This changed causes lots of warnings in the console during code generation from IDLs: ... Use of uninitialized value $optional in string eq at ../bindings/scripts/CodeGeneratorV8.pm line 1815. Use of uninitialized value $optional in string eq at ../bindings/scripts/CodeGeneratorV8.pm line 1832. Use of uninitialized value $optional in string eq at ../bindings/scripts/CodeGeneratorV8.pm line 1832. Use of uninitialized value $optional in string eq at ../bindings/scripts/CodeGeneratorV8.pm line 1832. Use of uninitialized value $optional in string eq at ../bindings/scripts/CodeGeneratorV8.pm line 1832. Use of uninitialized value $optional in string eq at ../bindings/scripts/CodeGeneratorV8.pm line 1832. Use of uninitialized value $optional in string eq at ../bindings/scripts/CodeGeneratorV8.pm line 1832. ...
(In reply to comment #7) > (In reply to comment #5) > > (From update of attachment 189004 [details] [details]) > > Clearing flags on attachment: 189004 > > > > Committed r143305: <http://trac.webkit.org/changeset/143305> > > This changed causes lots of warnings in the console during code generation from IDLs: Let me fix it in minutes.
Fixed in r143308. Sorry for the trouble!
Some Mac binding generation tests are still failing: http://build.webkit.org/builders/Apple%20MountainLion%20Debug%20WK1%20%28Tests%29/builds/5637/steps/bindings-generation-tests/logs/stdio Please fix.
Sorry, one sec.
Fixed in r143374. Sorry for the late fix!