WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 51554
Compiler warning in double->int conversion in TestNetscapePlugIn
https://bugs.webkit.org/show_bug.cgi?id=51554
Summary
Compiler warning in double->int conversion in TestNetscapePlugIn
Evan Martin
Reported
2010-12-23 12:38:48 PST
Compiler warning in double->int conversion in TestNetscapePlugIn
Attachments
Patch
(1.65 KB, patch)
2010-12-23 12:39 PST
,
Evan Martin
no flags
Details
Formatted Diff
Diff
Patch
(1.69 KB, patch)
2010-12-23 12:43 PST
,
Evan Martin
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Evan Martin
Comment 1
2010-12-23 12:39:55 PST
Created
attachment 77360
[details]
Patch
Evan Martin
Comment 2
2010-12-23 12:41:12 PST
I'm not sure this is correct, but the npruntime.h docs list JS to NPVariant type mappings, and it says: Number NPVariantType_Double or NPVariantType_Int32 Does that mean both the doubleValue and the intValue are filled in? ...wait a sec, it's a union, this can't be right. Let me retry.
Evan Martin
Comment 3
2010-12-23 12:43:04 PST
Created
attachment 77361
[details]
Patch
Darin Adler
Comment 4
2010-12-23 12:43:17 PST
Comment on
attachment 77360
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=77360&action=review
This change is wrong. I have no idea why the test case works!
> Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp:66 > - int32_t number = arguments[1].value.doubleValue; > + int32_t number = arguments[1].value.intValue;
This is incorrect. The code above checks for NPVARIANT_IS_DOUBLE, and it won’t work to just read intValue in that case. You can only read the union member that correctly corresponds to the variant that was used. For example, if you call NPVARIANT_IS_INT32 then you can read intValue.
Evan Martin
Comment 5
2010-12-23 12:45:26 PST
(I'm hoping the bots try this change for me, which is how I managed to upload the previous change which was totally wrong.)
Eric Seidel (no email)
Comment 6
2010-12-23 19:09:09 PST
You can force the bots to try a patch with queues.webkit.org/submit-to-ews
WebKit Review Bot
Comment 7
2011-06-18 13:10:27 PDT
Comment on
attachment 77361
[details]
Patch Clearing flags on attachment: 77361 Committed
r89202
: <
http://trac.webkit.org/changeset/89202
>
WebKit Review Bot
Comment 8
2011-06-18 13:10:32 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug