Get rid of WorkerPrivateParent template

RESOLVED FIXED in Firefox 60

Status

()

enhancement
P1
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: baku, Assigned: baku)

Tracking

58 Branch
mozilla60
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(19 attachments)

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
Assignee

Description

a year ago
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

Comment 1

a year ago
Assignee: nobody → amarchesini
Attachment #8947825 - Flags: review?(bkelly)
Assignee

Comment 4

a year ago
Attachment #8947830 - Flags: review?(bkelly)
Assignee

Comment 6

a year ago
Attachment #8947833 - Flags: review?(bkelly)
Assignee

Comment 7

a year ago
Attachment #8947835 - Flags: review?(bkelly)
Assignee

Comment 8

a year ago
Attachment #8947836 - Flags: review?(bkelly)
Assignee

Comment 10

a year ago
Attachment #8947839 - Flags: review?(bkelly)
Assignee

Comment 11

a year ago
Attachment #8947840 - Flags: review?(bkelly)
Assignee

Comment 12

a year ago
Attachment #8947841 - Flags: review?(bkelly)
Assignee

Comment 13

a year ago
Attachment #8947842 - Flags: review?(bkelly)
Assignee

Comment 16

a year ago
Attachment #8947852 - Flags: review?(bkelly)
Assignee

Comment 17

a year ago
Attachment #8947858 - Flags: review?(bkelly)
Assignee

Comment 18

a year ago
Attachment #8947860 - Flags: review?(bkelly)
Assignee

Comment 19

a year ago
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+

Comment 23

a year ago
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.