Closed
Bug 1154802
Opened 10 years ago
Closed 10 years ago
Implement tail dispatch on the main thread
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(4 files)
(deleted),
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
We're going to need to do this at some point if we want to use the state-mirroring machinery to mirror canonical main-thread values like mPlayState. I've also determined that TailDispatchers would nicely solve the races I'm seeing in bug 1144486 (given a few modifications).
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
Assignee | ||
Comment 3•10 years ago
|
||
This test assumes that the decoding machinery will have completed its work one
event-loop-round-trip after the document loads (see the executeSoon call), which
is a totally bogus assumption.
Attachment #8593590 -
Flags: review?(jwwang)
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8593591 -
Flags: review?(jwwang)
Assignee | ||
Comment 5•10 years ago
|
||
This is a followup from bug 1154805 comment 13.
Attachment #8593592 -
Flags: review?(jwwang)
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8593593 -
Flags: review?(jwwang)
Assignee | ||
Comment 7•10 years ago
|
||
Updated•10 years ago
|
Attachment #8593591 -
Flags: review?(jwwang) → review+
Updated•10 years ago
|
Attachment #8593592 -
Flags: review?(jwwang) → review+
Comment 8•10 years ago
|
||
Comment on attachment 8593593 [details] [diff] [review]
Part 4 - Implement tail dispatch for the main thread. v1
Review of attachment 8593593 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/AbstractThread.cpp
@@ +67,5 @@
> MOZ_ASSERT(in == (GetCurrent() == this));
> return in;
> }
>
> + void FireTailDispatcher() { MOZ_ASSERT(mTailDispatcher.isSome()); mTailDispatcher.reset(); }
I am afraid this is not consistent with |appShell->RunInStableState|. We should run the runnables contained in TaskGroupRunnable immediately here instead of dispatch it because FireTailDispatcher() is already executed in the synchronous section.
Attachment #8593593 -
Flags: review?(jwwang) → review-
Comment 9•10 years ago
|
||
Comment on attachment 8593593 [details] [diff] [review]
Part 4 - Implement tail dispatch for the main thread. v1
Review of attachment 8593593 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/AbstractThread.cpp
@@ +67,5 @@
> MOZ_ASSERT(in == (GetCurrent() == this));
> return in;
> }
>
> + void FireTailDispatcher() { MOZ_ASSERT(mTailDispatcher.isSome()); mTailDispatcher.reset(); }
Thinking about it again, I don't think we need to make TailDispatcher interchangeable with |appShell->RunInStableState|.
Attachment #8593593 -
Flags: review- → review+
Assignee | ||
Comment 10•10 years ago
|
||
(In reply to JW Wang [:jwwang] from comment #9)
> Thinking about it again, I don't think we need to make TailDispatcher
> interchangeable with |appShell->RunInStableState|.
Yeah - we use RunInStableState to implement TailDispatcher, but their semantics are fundamentally different.
Would you mind stamping the test change (part 1) as well? Then I can land it when inbound reopens. :-)
Flags: needinfo?(jwwang)
Comment 11•10 years ago
|
||
Comment on attachment 8593590 [details] [diff] [review]
Part 1 - Fix racey test_error_in_video_document.html. v1
Review of attachment 8593590 [details] [diff] [review]:
-----------------------------------------------------------------
This is indeed bug 608634. The delay-load-flag of the media element will prevent 'load' event of the page from being fired. Therefore, the error event of the media element should always be fired before the page load event. However, my last attempt to fix bug 608634 didn't succeed and the bug was pending until now. In order not to block your patch, I suggest to put a SimpleTest.todo to note we have to fix it in the future.
Attachment #8593590 -
Flags: review?(jwwang) → review+
Updated•10 years ago
|
Flags: needinfo?(jwwang)
Assignee | ||
Comment 12•10 years ago
|
||
Thanks for the reviews!
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/7b48c3a29d25
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/5005606be182
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/af419f5b5ef9
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/82b1e0300d4f
Comment 13•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7b48c3a29d25
https://hg.mozilla.org/mozilla-central/rev/5005606be182
https://hg.mozilla.org/mozilla-central/rev/af419f5b5ef9
https://hg.mozilla.org/mozilla-central/rev/82b1e0300d4f
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in
before you can comment on or make changes to this bug.
Description
•