Closed Bug 1435263 Opened 6 years ago Closed 6 years ago

Get rid of WorkerPrivateParent template

Categories

(Core :: DOM: Workers, enhancement, P1)

58 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(19 files)

10.20 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
14.34 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
8.67 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
4.88 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
38.81 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
5.61 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
5.06 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
17.08 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
9.58 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
13.16 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
1.57 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
3.42 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
10.94 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
6.77 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
4.13 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
12.81 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
7.10 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
6.27 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
12.10 KB, patch
bkelly
: review+
Details | Diff | Splinter Review
This is going to be a multi patch bug in order to do this operation step by step.
Note that this is meant to apply on top of bug 1435174 and bug 1435196.
Assignee: nobody → amarchesini
Attachment #8947825 - Flags: review?(bkelly)
Attachment #8947827 - Flags: review?(bkelly)
Attachment #8947829 - Flags: review?(bkelly)
Attachment #8947830 - Flags: review?(bkelly)
Attached patch part 5 - mParentSplinter Review
Attachment #8947833 - Flags: review?(bkelly)
Attachment #8947835 - Flags: review?(bkelly)
Attachment #8947836 - Flags: review?(bkelly)
Attachment #8947839 - Flags: review?(bkelly)
Attachment #8947840 - Flags: review?(bkelly)
Attachment #8947841 - Flags: review?(bkelly)
Attachment #8947842 - Flags: review?(bkelly)
Attachment #8947846 - Flags: review?(bkelly)
Attachment #8947852 - Flags: review?(bkelly)
Attachment #8947858 - Flags: review?(bkelly)
Attachment #8947860 - Flags: review?(bkelly)
This last patch is just about having this format:

class WorkerPrivate
{
public:
  methods;

private:
  methods;
  members;
};
Attachment #8947861 - Flags: review?(bkelly)
Priority: -- → P1
Attachment #8947825 - Flags: review?(bkelly) → review+
Comment on attachment 8947827 [details] [diff] [review]
part 1 - BusyCount and ParentStatus

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

::: dom/workers/WorkerPrivate.h
@@ +910,5 @@
>    bool mOnLine;
>  
> +  // This is touched on parent thread only, but it can be read on a different
> +  // thread before crashing because hanging.
> +  Atomic<uint64_t> mBusyCount;

Can you put this before the bool members to improve packing?
Attachment #8947827 - Flags: review?(bkelly) → review+
Attachment #8947829 - Flags: review?(bkelly) → review+
Comment on attachment 8947830 [details] [diff] [review]
part 3 - creation time

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

::: dom/workers/WorkerPrivate.h
@@ +882,5 @@
>    // thread before crashing because hanging.
>    Atomic<uint64_t> mBusyCount;
>  
> +  TimeStamp mCreationTimeStamp;
> +  DOMHighResTimeStamp mCreationTimeHighRes;

Again, it would be nice if we put these before the bool members to improve packing.
Attachment #8947830 - Flags: review?(bkelly) → review+
Attachment #8947832 - Flags: review?(bkelly) → review+
Attachment #8947833 - Flags: review?(bkelly) → review+
Attachment #8947835 - Flags: review?(bkelly) → review+
Attachment #8947836 - Flags: review?(bkelly) → review+
Attachment #8947838 - Flags: review?(bkelly) → review+
Attachment #8947839 - Flags: review?(bkelly) → review+
Attachment #8947840 - Flags: review?(bkelly) → review+
Attachment #8947841 - Flags: review?(bkelly) → review+
Attachment #8947842 - Flags: review?(bkelly) → review+
Attachment #8947846 - Flags: review?(bkelly) → review+
Attachment #8947848 - Flags: review?(bkelly) → review+
Attachment #8947852 - Flags: review?(bkelly) → review+
Attachment #8947858 - Flags: review?(bkelly) → review+
Attachment #8947860 - Flags: review?(bkelly) → review+
Comment on attachment 8947861 [details] [diff] [review]
part 18 - private/public sections

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

Thanks for all these improvements.  Maybe we could do one more patch or bug to make WorkerPrivate back optimally?  I think there are still some bool's mixed with other types, etc.
Attachment #8947861 - Flags: review?(bkelly) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/90740727f182
Get rid of WorkerPrivateParent template - part 0 - WorkerPrivate::EventTarget, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/daf0bb245dbb
Get rid of WorkerPrivateParent template - part 1 - BusyCount and ParentStatus, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/c0647c416bc2
Get rid of WorkerPrivateParent template - part 2 - mMainThreadObjectsForgotten, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/0fdd203c2ffb
Get rid of WorkerPrivateParent template - part 3 - creation time, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/853d78f5cbee
Get rid of WorkerPrivateParent template - part 4 - LoadInfo, JSSettings, ParentFrozen, IsSecureContext and IsChromeWorker, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/c71b6887c78c
Get rid of WorkerPrivateParent template - part 5 - mParent, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/3d025bdc4c4b
Get rid of WorkerPrivateParent template - part 6 - ScriptURL and WorkerName, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/382d5387d9f9
Get rid of WorkerPrivateParent template - part 7 - WorkerType, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/93ad1a38b40c
Get rid of WorkerPrivateParent template - part 8 - QueueRunnables, ParentWindowPauseDepth, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/1e522b145b42
Get rid of WorkerPrivateParent template - part 9 - SharedWorkers, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/d48000437e94
Get rid of WorkerPrivateParent template - part 10 - PreStartRunnables, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/f819bc8e2457
Get rid of WorkerPrivateParent template - part 11 - Debugger, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/7ca8a99e286a
Get rid of WorkerPrivateParent template - part 12 - Freeze/Thaw, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/20b7fc423f7d
Get rid of WorkerPrivateParent template - part 13 - Start/Close/Kill/Terminate, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/81af68b2de18
Get rid of WorkerPrivateParent template - part 14 - MaybeWrapAsWorkerRunnable and ProxyReleaseMainThreadObjects, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/d0c92aaeeff6
Get rid of WorkerPrivateParent template - part 15 - update methods, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/3901faa7593e
Get rid of WorkerPrivateParent template - part 16 - Dispatch methods, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/e6e8bbc7b68f
Get rid of WorkerPrivateParent template - part 17 - WorkerPrivateParent, r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/c40197fd33e0
Get rid of WorkerPrivateParent template - part 18 - private/public sections, r=bkelly
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: