Bug 167399 - Atomics.store should return the int-converted value according to toInteger
Summary: Atomics.store should return the int-converted value according to toInteger
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-01-24 17:23 PST by Filip Pizlo
Modified: 2017-01-24 18:59 PST (History)
6 users (show)

See Also:


Attachments
the patch (7.46 KB, patch)
2017-01-24 18:01 PST, Filip Pizlo
saam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2017-01-24 17:23:15 PST
Pathc forthcoming.
Comment 1 Radar WebKit Bug Importer 2017-01-24 17:24:14 PST
<rdar://problem/30178458>
Comment 2 Filip Pizlo 2017-01-24 18:01:23 PST
Created attachment 299659 [details]
the patch
Comment 3 Saam Barati 2017-01-24 18:06:41 PST
Comment on attachment 299659 [details]
the patch

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

> JSTests/stress/atomics-store-return.js:14
> +result = Atomics.store(a, 0, 4000000000);
>  if (result != 4000000000)
>      throw "Error: bad result: " + result;
> +result = Atomics.store(a, 0, -4000000000);
> +if (result != -4000000000)
> +    throw "Error: bad result: " + result;

Can you add a valueOf test too?
Comment 4 Filip Pizlo 2017-01-24 18:09:37 PST
(In reply to comment #3)
> Comment on attachment 299659 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=299659&action=review
> 
> > JSTests/stress/atomics-store-return.js:14
> > +result = Atomics.store(a, 0, 4000000000);
> >  if (result != 4000000000)
> >      throw "Error: bad result: " + result;
> > +result = Atomics.store(a, 0, -4000000000);
> > +if (result != -4000000000)
> > +    throw "Error: bad result: " + result;
> 
> Can you add a valueOf test too?

Good idea.  Will do.
Comment 5 Filip Pizlo 2017-01-24 18:59:16 PST
Landed in https://trac.webkit.org/changeset/211129