Closed Bug 718600 Opened 8 years ago Closed 8 years ago

remove JSRuntime::(rtLock, state)

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: igor, Assigned: igor)

Details

Attachments

(1 file)

Currently JSRuntime::rtLock is only used to protect the management of JSRuntime::state. The latter in turn exists only to support embedding that can create their first JSContext instance and destroy the last instance from an arbitrary thread. As neither browser nor shell needs this functionality, we can remove the rtLock and any related fields. 

AFAICS it should be possible to do that now even if we would need to postpone a switch to single-threaded runtime due to potential compatibility concerns.
Attached patch v1Splinter Review
The patch replaces JSRuntime::state checks with a query on whether the runtime has any contexts.
Attachment #589301 - Flags: review?(luke)
Comment on attachment 589301 [details] [diff] [review]
v1

Right on.
Attachment #589301 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/9519fed510ee
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.