Bug 167399

Summary: Atomics.store should return the int-converted value according to toInteger
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch saam: review+

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