mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
Bug 1405821 - Move microtask handling to CycleCollectedJSContext
Tag UXP Issue #1344
This commit is contained in:
parent
5776911c05
commit
fb6f6ec903
11 changed files with 100 additions and 84 deletions
|
|
@ -12610,8 +12610,12 @@ MarkDocumentTreeToBeInSyncOperation(nsIDocument* aDoc, void* aData)
|
|||
|
||||
nsAutoSyncOperation::nsAutoSyncOperation(nsIDocument* aDoc)
|
||||
{
|
||||
mMicroTaskLevel = nsContentUtils::MicroTaskLevel();
|
||||
nsContentUtils::SetMicroTaskLevel(0);
|
||||
mMicroTaskLevel = 0;
|
||||
CycleCollectedJSContext* ccjs = CycleCollectedJSContext::Get();
|
||||
if (ccjs) {
|
||||
mMicroTaskLevel = ccjs->MicroTaskLevel();
|
||||
ccjs->SetMicroTaskLevel(0);
|
||||
}
|
||||
if (aDoc) {
|
||||
if (nsPIDOMWindowOuter* win = aDoc->GetWindow()) {
|
||||
if (nsCOMPtr<nsPIDOMWindowOuter> top = win->GetTop()) {
|
||||
|
|
@ -12627,7 +12631,10 @@ nsAutoSyncOperation::~nsAutoSyncOperation()
|
|||
for (int32_t i = 0; i < mDocuments.Count(); ++i) {
|
||||
mDocuments[i]->SetIsInSyncOperation(false);
|
||||
}
|
||||
nsContentUtils::SetMicroTaskLevel(mMicroTaskLevel);
|
||||
CycleCollectedJSContext* ccjs = CycleCollectedJSContext::Get();
|
||||
if (ccjs) {
|
||||
ccjs->SetMicroTaskLevel(mMicroTaskLevel);
|
||||
}
|
||||
}
|
||||
|
||||
gfxUserFontSet*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue