Bug 70267 - CodeGeneratorGObject.pm should use g_value_get_uint() for IDL attributes of type unsigned short.
Summary: CodeGeneratorGObject.pm should use g_value_get_uint() for IDL attributes of t...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anna Cavender
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-17 13:36 PDT by Anna Cavender
Modified: 2011-10-18 15:28 PDT (History)
8 users (show)

See Also:


Attachments
Patch (3.08 KB, patch)
2011-10-17 13:47 PDT, Anna Cavender
no flags Details | Formatted Diff | Diff
Patch for landing (3.06 KB, patch)
2011-10-18 09:41 PDT, Anna Cavender
no flags Details | Formatted Diff | Diff
Patch for landing (3.06 KB, patch)
2011-10-18 09:46 PDT, Anna Cavender
no flags Details | Formatted Diff | Diff
fix for binding tests (1.77 KB, patch)
2011-10-18 12:40 PDT, Anna Cavender
dbates: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anna Cavender 2011-10-17 13:36:51 PDT
GetGValueTypeName() in CodeGeneratorGObject converts writable attributes of type unsigned short to g_value_get_ushort(), which is a function that does not exist!  I propose changing it to instead generate g_value_get_uint(), which does exist, when it sees this type.  I think this is a ligit change because GetGValueTypeName() already converts 'short' to 'int', so converting 'unsigned short' to 'uint' seems reasonable.

For more info and an example, see https://bugs.webkit.org/show_bug.cgi?id=62887
Comment 1 Anna Cavender 2011-10-17 13:47:22 PDT
Created attachment 111315 [details]
Patch
Comment 2 WebKit Review Bot 2011-10-17 13:48:50 PDT
Attachment 111315 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/update-webkit', '--chromium']" exit_code: 2

Updating OpenSource
Current branch master is up to date.
Updating chromium port dependencies using gclient...
Error: Can't switch the checkout to http://v8.googlecode.com/svn/branches/3.6@9637; UUID don't match and there is local changes in /mnt/git/webkit-style-queue/Source/WebKit/chromium/v8. Delete the directory and try again.
Re-trying 'depot_tools/gclient sync'
Error: Can't switch the checkout to http://v8.googlecode.com/svn/branches/3.6@9637; UUID don't match and there is local changes in /mnt/git/webkit-style-queue/Source/WebKit/chromium/v8. Delete the directory and try again.
Re-trying 'depot_tools/gclient sync'
Error: Can't switch the checkout to http://v8.googlecode.com/svn/branches/3.6@9637; UUID don't match and there is local changes in /mnt/git/webkit-style-queue/Source/WebKit/chromium/v8. Delete the directory and try again.
Error: 'depot_tools/gclient sync' failed 3 tries and returned 256 at Tools/Scripts/update-webkit-chromium line 107.
Re-trying 'depot_tools/gclient sync'
No such file or directory at Tools/Scripts/update-webkit line 104.


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Martin Robinson 2011-10-17 23:13:08 PDT
Comment on attachment 111315 [details]
Patch

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

> Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:1583
> -G_MAXUINT16, /* max */
> +G_MAXUINT, /* max */

Would it make more sense to use G_MAXUSHORT here?
Comment 4 Martin Robinson 2011-10-17 23:13:51 PDT
By the way, thanks for fixing this. I really appreciate it!
Comment 5 Xan Lopez 2011-10-18 01:48:18 PDT
Comment on attachment 111315 [details]
Patch

This makes sense to me with Martin's suggestion. Thanks for the patch!
Comment 6 Anna Cavender 2011-10-18 09:36:46 PDT
Thanks for the quick review.  I'll change to G_MAXUSHORT and then land.
Comment 7 Anna Cavender 2011-10-18 09:41:01 PDT
Created attachment 111454 [details]
Patch for landing
Comment 8 WebKit Review Bot 2011-10-18 09:43:54 PDT
Comment on attachment 111454 [details]
Patch for landing

Rejecting attachment 111454 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1

NOBODY (OOPS!) found in /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog does not appear to be a valid reviewer according to committers.py.
ERROR: /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://queues.webkit.org/results/10124298
Comment 9 Anna Cavender 2011-10-18 09:46:49 PDT
Created attachment 111456 [details]
Patch for landing
Comment 10 WebKit Review Bot 2011-10-18 11:17:44 PDT
Comment on attachment 111456 [details]
Patch for landing

Clearing flags on attachment: 111456

Committed r97778: <http://trac.webkit.org/changeset/97778>
Comment 11 WebKit Review Bot 2011-10-18 11:17:51 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Ryosuke Niwa 2011-10-18 12:18:43 PDT
It appears that this patch broke binding tests:
http://build.webkit.org/builders/SnowLeopard%20Intel%20Release%20%28Tests%29/builds/34000
Comment 13 Anna Cavender 2011-10-18 12:31:56 PDT
Oops, looks like G_MAXUINT is required by the test, not G_MAXUSHORT.  New patch on the way.
Comment 14 Anna Cavender 2011-10-18 12:40:24 PDT
Created attachment 111482 [details]
fix for binding tests
Comment 15 Anna Cavender 2011-10-18 12:56:20 PDT
needs fix for binding tests
Comment 16 WebKit Review Bot 2011-10-18 15:17:45 PDT
Comment on attachment 111482 [details]
fix for binding tests

Rejecting attachment 111482 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
l Bates', u'--for..." exit_code: 1

Parsed 2 diffs from patch file(s).
patching file Source/WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
Hunk #1 FAILED at 1580.
1 out of 1 hunk FAILED -- saving rejects to file Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp.rej

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'Daniel Bates', u'--for..." exit_code: 1

Full output: http://queues.webkit.org/results/10142103
Comment 17 Anna Cavender 2011-10-18 15:28:30 PDT
Landed by hand:
http://trac.webkit.org/changeset/97793