Bug 52837 - [v8] CodeGeneratorV8 generates incorrect code for callbacks with no parameters
Summary: [v8] CodeGeneratorV8 generates incorrect code for callbacks with no parameters
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: James Robinson
URL:
Keywords:
Depends on:
Blocks: 51218
  Show dependency treegraph
 
Reported: 2011-01-20 13:08 PST by James Robinson
Modified: 2011-01-20 15:05 PST (History)
5 users (show)

See Also:


Attachments
Patch (18.09 KB, patch)
2011-01-20 13:22 PST, James Robinson
japhet: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Robinson 2011-01-20 13:08:35 PST
[v8] CodeGeneratorV8 generates incorrect code for callbacks with no parameters
Comment 1 James Robinson 2011-01-20 13:22:53 PST
Created attachment 79643 [details]
Patch
Comment 2 Nate Chapin 2011-01-20 13:31:07 PST
Comment on attachment 79643 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=79643&action=review

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:2406
> +            } else {
> +                push(@implContent, "\n    v8::Handle<v8::Value> *argv = 0;\n\n");
> +            }

Nit: no {} for the else statement
Comment 3 James Robinson 2011-01-20 13:38:25 PST
(In reply to comment #2)
> (From update of attachment 79643 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=79643&action=review
> 
> > Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:2406
> > +            } else {
> > +                push(@implContent, "\n    v8::Handle<v8::Value> *argv = 0;\n\n");
> > +            }
> 
> Nit: no {} for the else statement

The other one-line conditionals in this file seem to use {}s
Comment 4 Nate Chapin 2011-01-20 13:39:36 PST
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 79643 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=79643&action=review
> > 
> > > Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:2406
> > > +            } else {
> > > +                push(@implContent, "\n    v8::Handle<v8::Value> *argv = 0;\n\n");
> > > +            }
> > 
> > Nit: no {} for the else statement
> 
> The other one-line conditionals in this file seem to use {}s

Hmm....I had forgotten that.  nvm then.
Comment 5 James Robinson 2011-01-20 13:40:09 PST
Committed r76277: <http://trac.webkit.org/changeset/76277>
Comment 6 Adam Barth 2011-01-20 15:05:21 PST
Comment on attachment 79643 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=79643&action=review

>>>> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:2406
>>>> +            } else {
>>>> +                push(@implContent, "\n    v8::Handle<v8::Value> *argv = 0;\n\n");
>>>> +            }
>>> 
>>> Nit: no {} for the else statement
>> 
>> The other one-line conditionals in this file seem to use {}s
> 
> Hmm....I had forgotten that.  nvm then.

I think they're required in Perl.