Closed Bug 1429727 Opened 2 years ago Closed 2 years ago

js::ThreadLocalData template is confusingly named

Categories

(Core :: JavaScript Engine, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

The name of our ThreadLocalData template suggests that it provides thread local storage, with a separate copy of the data it contains for every thread.  (This is what mozilla::ThreadLocal / MOZ_THREAD_LOCAL do.)

In fact it restricts access to the data to the thread that created it.

This is used here for example: https://searchfox.org/mozilla-central/source/js/src/jscntxt.h#114
Priority: -- → P5
Patch to rename ThreadLocalData to ThreadData, for fields that can be only accessed for a single thread.
Assignee: nobody → jcoppeard
Attachment #8968458 - Flags: review?(lhansen)
Comment on attachment 8968458 [details] [diff] [review]
bug1429727-rename-thread-local

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

Yes, please!
Attachment #8968458 - Flags: review?(lhansen) → review+
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a1ceebb96b78
Rename js::ThreadLocalData to prevent confusion with mozilla::ThreadLocal r=lth
https://hg.mozilla.org/mozilla-central/rev/a1ceebb96b78
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.