Fix SM shell tsan failures in OSObject.cpp

RESOLVED FIXED in Firefox 55

Status

()

Core
JavaScript Engine
RESOLVED FIXED
10 months ago
9 months ago

People

(Reporter: sfink, Assigned: sfink)

Tracking

(Depends on: 1 bug)

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 months ago
Up until now, we've kept js.cpp very self-contained, and it's grown into a monstrosity. shell/OSObject.cpp tries to split off some stuff, but it ran into the monolithic nature. So I moved ShellContext into a header file so that I can store some state there instead of in global variables.
(Assignee)

Comment 1

10 months ago
Created attachment 8867032 [details] [diff] [review]
Move g{Out,Err}FilePtr into ShellContext for thread safety

This isn't just a thread safety fix. Before this, you actually had multiple threads sharing these output files, and if more than one thread ever decided to change them, you would get a complete mess. Per-context values make much more sense than per-process.
Attachment #8867032 - Flags: review?(jcoppeard)

Comment 2

10 months ago
Comment on attachment 8867032 [details] [diff] [review]
Move g{Out,Err}FilePtr into ShellContext for thread safety

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

Nice catch.
Attachment #8867032 - Flags: review?(jcoppeard) → review+

Comment 3

9 months ago
Pushed by sfink@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7c5aadffcf7c
Move g{Out,Err}FilePtr into ShellContext for thread safety, r=jonco

Comment 4

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7c5aadffcf7c
Status: ASSIGNED → RESOLVED
Last Resolved: 9 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.