Closed Bug 1518038 Opened 5 years ago Closed 5 years ago

Add nsIThread.hasPendingHighPriorityEvents

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(1 file)

I would expect we'll need this in many places when improving paint scheduling.
Unfortunately our thread implementation is super complicated atm and has some odd abstractions which are mostly unused - so the patch is way larger than it needs to be. Patch coming.
This adds also nsThreadManager::MainThreadHasPendingHighPriorityEvents().

I tested this stuff locally by adding 
nsThreadManager::MainThreadHasPendingHighPriorityEvents() calls to ContentSink and we do have pending high prio events occasionally during parsing.

Lots of boilerplate code to check !mHighQueue->IsEmpty(aProofOfLock);
Attachment #9034625 - Flags: review?(nfroyd)
Comment on attachment 9034625 [details] [diff] [review]
haspendinghighprioevents.diff

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

Bug 1514011 comment 4 says that we might not need this?
Attachment #9034625 - Flags: review?(nfroyd) → review+

In that bug, but I actually need this elsewhere.

Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c9fcbe28afda
Add nsIThread.hasPendingHighPriorityEvents, r=froydnj
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: