Closed
Bug 1249102
Opened 9 years ago
Closed 9 years ago
Make overrides of WorkerRunnable::PostRun a bit more consistent
Categories
(Core :: DOM: Workers, defect)
Core
DOM: Workers
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Whiteboard: dom-triaged btpp-active)
Attachments
(1 file)
8.20 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
Right now they do similar things in somewhat different ways. It would really be better if they didn't do that.
Updated•9 years ago
|
Whiteboard: dom-triaged btpp-active
Assignee | ||
Comment 1•9 years ago
|
||
Specifically we make the following changes:
1) Remove WorkerSameThreadRunnable::PostRun, because it does exactly the same
things as WorkerRunnable::PostRun.
2) Always treat ModifyBusyCountFromWorker as infallible in terms of throwing
JS exceptions.
3) Change ExtendableFunctionalEventWorkerRunnable::PostRun to properly call
its superclass PostRun so we will correctly decrement the busy count our
PreDispatch incremented.
Attachment #8720635 -
Flags: review?(khuey)
Comment on attachment 8720635 [details] [diff] [review]
Make overrides of WorkerRunnable::PostRun a bit more consistent
Review of attachment 8720635 [details] [diff] [review]:
-----------------------------------------------------------------
Can we go ahead and nerf ModifyBusyCountFromWorker's return value too?
You might want the commit message to mention Pre/PostDispatch too.
::: dom/base/WebSocket.cpp
@@ +2703,5 @@
> PreDispatch(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
> {
> + // We don't call WorkerRunnable::PreDispatch because it would assert the
> + // wrong thing about which thread we're on. Which thread _are_ we on,
> + // exactly?
That's an *excellent* question. I think you're on either the main thread or the STS thread. See WebSocketImpl::InitializeConnection and the retargeting, and note that WebSocketImpl is an nsIEventTarget.
Attachment #8720635 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 3•9 years ago
|
||
> Can we go ahead and nerf ModifyBusyCountFromWorker's return value too?
I _think_ so, but would really rather do that in a followup or something.
> You might want the commit message to mention Pre/PostDispatch too.
Will do.
> I think you're on either the main thread or the STS thread.
Ah, indeed. Will document that we're on the thread the channel implementation is running on, which I agree should generally be main or STS.
Comment 5•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•