Closed Bug 1339945 Opened 3 years ago Closed 3 years ago

Refactor mscom::MainThreadInvoker

Categories

(Core :: IPC, defect)

Unspecified
Windows
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: aklotz, Assigned: aklotz)

References

Details

Attachments

(1 file)

I want to move the waiting mechanism into a separate class.
Comment on attachment 8837793 [details]
Bug 1339945: Refactor mscom::MainThreadInvoker's wait mechanism into a separate class;

https://reviewboard.mozilla.org/r/112798/#review117196

::: ipc/mscom/MainThreadInvoker.cpp:38
(Diff revision 1)
>    {
> -    MOZ_ASSERT(sIsMulticore || mDoneEvent);
>      MOZ_ASSERT(mRunnable);
>    }
>  
> -  ~SyncRunnable()
> +  ~SyncRunnable() = default;

Its up to you but do you feel we still need this?  Same for ~SpinEvent.

::: ipc/mscom/SpinEvent.cpp:30
(Diff revision 1)
> +namespace mscom {
> +
> +SpinEvent::SpinEvent()
> +  : mDone(false)
> +{
> +  static const bool sIsMulticore = []() {

Points for the first time I've seen this pattern used for a static init block in C++.  I'll have to remember that.
Attachment #8837793 - Flags: review?(davidp99) → review+
Pushed by aklotz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0ae0446f58c3
Refactor mscom::MainThreadInvoker's wait mechanism into a separate class; r=handyman
https://hg.mozilla.org/mozilla-central/rev/0ae0446f58c3
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.