Bug 112760 - do not use string reference for enum support in CodeGeneratorJS.pm
Summary: do not use string reference for enum support in CodeGeneratorJS.pm
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: arno.
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-19 17:54 PDT by arno.
Modified: 2013-03-20 10:55 PDT (History)
5 users (show)

See Also:


Attachments
patch proposal (4.23 KB, patch)
2013-03-19 17:56 PDT, arno.
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description arno. 2013-03-19 17:54:40 PDT
Hi,
as discussed in bug #112475 comment 13, this is about not using String reference in generated binding for enum values.
Comment 1 arno. 2013-03-19 17:56:27 PDT
Created attachment 193958 [details]
patch proposal
Comment 2 Kentaro Hara 2013-03-19 18:03:30 PDT
Comment on attachment 193958 [details]
patch proposal

Thanks for the quick fix.
Comment 3 WebKit Review Bot 2013-03-19 19:13:44 PDT
Comment on attachment 193958 [details]
patch proposal

Clearing flags on attachment: 193958

Committed r146292: <http://trac.webkit.org/changeset/146292>
Comment 4 WebKit Review Bot 2013-03-19 19:13:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Darin Adler 2013-03-20 10:55:35 PDT
Comment on attachment 193958 [details]
patch proposal

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

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2147
> +                                    push(@implContent, "    const String string = value.isEmpty() ? String() : value.toString(exec)->value(exec);\n");

Not sure why the const is here. It’s OK, but unneeded.

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2789
> +            push(@$outputArray, "    const String ${name}(${argValue}.isEmpty() ? String() : ${argValue}.toString(exec)->value(exec));\n");

Ditto.