Closed Bug 1335319 Opened 7 years ago Closed 7 years ago

stylo: Add a global flag indicating that we're doing a parallel traversal

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: bholley, Unassigned)

References

Details

Attachments

(1 file, 2 obsolete files)

There are various situations where we avoid caching things or otherwise take different behavior to prevent race conditions during the parallel servo traversal. Right now we check NS_IsMainThread, but that's overly-general and incurs a TLS lookup.

Instead, we should just set a global flag when we begin the traversal (since the main thread is blocked), and clear it when the traversal is complete.
Attachment #8833025 - Attachment is obsolete: true
Attachment #8833025 - Flags: review?(bzbarsky)
Rearranged things a tiny bit.
Attachment #8833071 - Flags: review?(bzbarsky)
Attachment #8833026 - Attachment is obsolete: true
Attachment #8833026 - Flags: review?(bzbarsky)
Comment on attachment 8833071 [details] [diff] [review]
Add a global flag indicating that we're in the servo traversal. v3

I guess this works for now, though how this plays with quantum DOM is less clear to me...
Attachment #8833071 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky [:bz] (still a bit busy) from comment #4)
> Comment on attachment 8833071 [details] [diff] [review]
> Add a global flag indicating that we're in the servo traversal. v3
> 
> I guess this works for now, though how this plays with quantum DOM is less
> clear to me...

That is another bridge to cross at a later point. :-)
Pushed by bholley@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/93327d92cc47
Add a global flag indicating that we're in the servo traversal. r=bz
https://hg.mozilla.org/mozilla-central/rev/93327d92cc47
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: