Closed
Bug 1225040
Opened 9 years ago
Closed 9 years ago
Add jsapi-tests for TypedArray on SharedArrayBuffer
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: lth, Assigned: lth)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
arai
:
review+
|
Details | Diff | Splinter Review |
All TypedArray jsapi-test tests currently work with ArrayBuffer. Clearly we need to do better once TypedArray can map SharedArrayBuffer.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
The "p" failure in that run is bug 1230162, technically a problem with running tests in parallel but fundamentally we should also clean up SpiderMonkey.
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8695789 -
Flags: review?(arai.unmht)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → lhansen
Status: NEW → ASSIGNED
Comment 4•9 years ago
|
||
Comment on attachment 8695789 [details] [diff] [review]
generalize jsapi-tests for SAB
Review of attachment 8695789 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jsapi-tests/testTypedArrays.cpp
@@ +66,5 @@
>
> return ok;
> }
>
> +// Shared memory can only be mapped by a TypedArray by creating the TypedArray with
"with" should be moved to the next line, to make this line fit into 79 chars.
@@ +115,5 @@
> TestArrayFromBuffer(JSContext* cx)
> {
> size_t elts = 8;
> size_t nbytes = elts * sizeof(Element);
> + RootedObject buffer(cx, Shared ? JS_NewSharedArrayBuffer(cx, nbytes) : JS_NewArrayBuffer(cx, nbytes));
please wrap this line into 99 chars ;)
(or maybe there's different style rule for test files?)
@@ +120,5 @@
> {
> JS::AutoCheckCannotGC nogc;
> bool isShared;
> + void* data = Shared ? JS_GetSharedArrayBufferData(buffer, &isShared, nogc)
> + : JS_GetArrayBufferData(buffer, &isShared, nogc);
":" should be aligned to the same column as "S" of "Shared ?" in previous line.
@@ +121,5 @@
> JS::AutoCheckCannotGC nogc;
> bool isShared;
> + void* data = Shared ? JS_GetSharedArrayBufferData(buffer, &isShared, nogc)
> + : JS_GetArrayBufferData(buffer, &isShared, nogc);
> + MOZ_ASSERT(Shared == isShared);
as "Shared" is now variable, using CHECK might be better for testing purpose here, and following several places.
Attachment #8695789 -
Flags: review?(arai.unmht) → review+
Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a42590c2a8bf36bc766621cb0362dff28de037df
Bug 1225040 - generalize jsapi-tests for SAB. r=arai
Comment 6•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•