Add a jsapi-test that creates multiple JSRuntimes in different threads

ASSIGNED
Assigned to

Status

()

Core
JavaScript Engine
ASSIGNED
2 years ago
2 years ago

People

(Reporter: jorendorff, Assigned: jorendorff, NeedInfo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

2 years ago
In response to a question on dev.tech.js-engine today.

We already have code for creating a second JSRuntime on a thread in shell/js.cpp, but it's not the simplest possible straight-line code. I dunno, seems like something we might as well smoke-test.
(Assignee)

Comment 1

2 years ago
Created attachment 8735612 [details] [diff] [review]
Part 1: Whitespace style nits in jsapi-tests/tests.h
Attachment #8735612 - Flags: review?(terrence)
(Assignee)

Updated

2 years ago
Assignee: nobody → jorendorff
Status: NEW → ASSIGNED
(Assignee)

Comment 2

2 years ago
Created attachment 8735613 [details] [diff] [review]
Part 2: Add a test that JS_NewRuntime works on threads and multiple threads can run code, racing freely

(The fork-join code is stolen from testThreadingExclusiveData.cpp.)
Attachment #8735613 - Flags: review?(terrence)
Comment on attachment 8735612 [details] [diff] [review]
Part 1: Whitespace style nits in jsapi-tests/tests.h

Review of attachment 8735612 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, those have always bugged me.
Attachment #8735612 - Flags: review?(terrence) → review+
Attachment #8735613 - Flags: review?(terrence) → review+
(Assignee)

Comment 4

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/4e095aa245ac330e3978bd169f27ccf23fd30020
Bug 1260272 - Part 1: Whitespace style nits in jsapi-tests/tests.h. r=terrence.

https://hg.mozilla.org/integration/mozilla-inbound/rev/9dacf02bb0ef6f8adde5f4085b9c3c669fdb2f60
Bug 1260272 - Part 2: Add a test that JS_NewRuntime works on threads and multiple threads can run code, racing freely. r=terrence.
This and bug 1255128 are backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/242bab2c3b06 for breaking android cpp tests: https://treeherder.mozilla.org/logviewer.html#?job_id=27166818&repo=mozilla-inbound
Flags: needinfo?(jorendorff)
You need to log in before you can comment on or make changes to this bug.