Make CycleCollectedJSContext to handle microtasks and make MutationObserver to use them

RESOLVED FIXED in Firefox 58

Status

()

defect
P3
normal
RESOLVED FIXED
2 years ago
3 months ago

People

(Reporter: smaug, Assigned: smaug)

Tracking

unspecified
mozilla58
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox58 fixed)

Details

Attachments

(2 attachments)

Assignee

Description

2 years ago
I haven't ever pushed this to try without some other stuff for bug 1193394, but it is possible that I've forgotten some mutation observer related tweak, which is in some other patch I have locally.
But let's see what tryserver says.

remote: View your change here:
remote:   https://hg.mozilla.org/try/rev/bec271413206a67485ca4704573da02e0c922bec
remote: 
remote: Follow the progress of your build on Treeherder:
remote:   https://treeherder.mozilla.org/#/jobs?repo=try&revision=bec271413206a67485ca4704573da02e0c922bec
remote: recorded changegroup in replication log in 0.029s


Not sure who should review this, perhaps both you baku and bevis :)
Attachment #8916610 - Flags: review?(btseng)
Attachment #8916610 - Flags: review?(amarchesini)
Assignee

Comment 1

2 years ago
oh, crap, I pushed with wrong try syntax
Assignee

Comment 2

2 years ago
remote: View your change here:
remote:   https://hg.mozilla.org/try/rev/467f9f511a430bcbf9a94513ea86c580a740ad5b
remote: 
remote: Follow the progress of your build on Treeherder:
remote:   https://treeherder.mozilla.org/#/jobs?repo=try&revision=467f9f511a430bcbf9a94513ea86c580a740ad5b
remote: recorded changegroup in replication log in 0.016s
Assignee

Comment 3

2 years ago
ok, that looks reasonable green.
Priority: -- → P3
Comment on attachment 8916610 [details] [diff] [review]
make_mt_use_ccjs_microtasks.diff

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

::: dom/base/nsDOMMutationObserver.cpp
@@ +596,5 @@
>    mWaitingForRun = true;
>    RescheduleForRun();
>  }
>  
> +class MutationObserverMicroTask : public MicroTaskRunnable

final ?

::: xpcom/base/CycleCollectedJSContext.cpp
@@ +438,5 @@
>  
>    mPromiseMicroTaskQueue.push(runnable.forget());
>  }
>  
> +class AsyncMutationHandler : public mozilla::Runnable

final
Attachment #8916610 - Flags: review?(amarchesini) → review+
Comment on attachment 8916610 [details] [diff] [review]
make_mt_use_ccjs_microtasks.diff

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

::: xpcom/base/CycleCollectedJSContext.h
@@ +237,5 @@
>    {
>      mMicroTaskLevel = aLevel;
>    }
>  
>    void PerformMainThreadMicroTaskCheckpoint();

This could be removed now after all callsites are replaced with PerformMicroTaskCheckPoint().
Attachment #8916610 - Flags: review?(btseng) → review+

Comment 7

2 years ago
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/374ab23d114e
Make CycleCollectedJSContext to handle microtasks and make MutationObserver to use them, r=baku,bevis

Comment 8

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/374ab23d114e
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Assignee: nobody → bugs
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.