remove JSRuntime::(rtLock, state)

RESOLVED FIXED in mozilla12

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Igor Bukanov, Assigned: Igor Bukanov)

Tracking

unspecified
mozilla12
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
Created attachment 589301 [details] [diff] [review]
v1

The patch replaces JSRuntime::state checks with a query on whether the runtime has any contexts.
Attachment #589301 - Flags: review?(luke)

Comment 2

5 years ago
Comment on attachment 589301 [details] [diff] [review]
v1

Right on.
Attachment #589301 - Flags: review?(luke) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/9519fed510ee
https://hg.mozilla.org/mozilla-central/rev/9519fed510ee
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.