WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
145563
JSExport protocol with an NSInteger property converts negative values to 18446744073709552000
https://bugs.webkit.org/show_bug.cgi?id=145563
Summary
JSExport protocol with an NSInteger property converts negative values to 1844...
Keith Miller
Reported
2015-06-02 13:08:26 PDT
Steps to Reproduce: My code roughly looks like: @protocol XXThingExports <JSExport> @property (nonatomic) NSInteger level; @end @interface XXThing : NSObject <XXThingExports> @property (nonatomic) NSInteger level; @end 1. From Objective-C, set `level` to a negative value like -46. 2. Accessing the `level` property of an XXThing object from JavaScript gives 18446744073709552000. Expected Results: thing.level should be -46 Actual Results: thing.level is 18446744073709552000
Attachments
The Patch
(3.01 KB, patch)
2015-06-02 13:23 PDT
,
Keith Miller
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Keith Miller
Comment 1
2015-06-02 13:10:21 PDT
<
rdar://problem/19123511
>
Keith Miller
Comment 2
2015-06-02 13:23:00 PDT
Created
attachment 254089
[details]
The Patch
Darin Adler
Comment 3
2015-06-02 13:38:05 PDT
Comment on
attachment 254089
[details]
The Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=254089&action=review
> Source/JavaScriptCore/API/tests/testapi.mm:1421 > +@property (nonatomic) NSInteger number;
What if the property is an NSUInteger? Could we add a test case that covers that?
WebKit Commit Bot
Comment 4
2015-06-02 14:24:34 PDT
Comment on
attachment 254089
[details]
The Patch Clearing flags on attachment: 254089 Committed
r185122
: <
http://trac.webkit.org/changeset/185122
>
WebKit Commit Bot
Comment 5
2015-06-02 14:24:36 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