Closed Bug 1406922 Opened 3 years ago Closed 3 years ago

Make CycleCollectedJSContext to handle microtasks and make MutationObserver to use them

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(2 files)

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)
oh, crap, I pushed with wrong try syntax
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
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+
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
https://hg.mozilla.org/mozilla-central/rev/374ab23d114e
Status: NEW → RESOLVED
Closed: 3 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.