Closed
Bug 1505494
Opened 6 years ago
Closed 6 years ago
Crash in mozilla::dom::IsWindowAllowedToPlay
Categories
(Core :: Audio/Video: Playback, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox63 | --- | unaffected |
firefox64 | - | fixed |
firefox65 | - | fixed |
People
(Reporter: philipp, Assigned: alwu)
References
Details
(Keywords: crash, regression)
Crash Data
Attachments
(2 files)
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
|
Details | Review |
47 bytes,
text/x-phabricator-request
|
Details | Review |
This bug was filed from the Socorro interface and is report bp-89ce8211-2215-475f-84f3-4d4980181031. ============================================================= Top 10 frames of crashing thread: 0 xul.dll static bool mozilla::dom::IsWindowAllowedToPlay dom/media/AutoplayPolicy.cpp:94 1 xul.dll static bool mozilla::dom::IsMediaElementAllowedToPlay dom/media/AutoplayPolicy.cpp:148 2 xul.dll mozilla::dom::AutoplayPolicy::IsAllowedToPlay dom/media/AutoplayPolicy.cpp:194 3 xul.dll void mozilla::dom::HTMLMediaElement::UpdatePreloadAction dom/html/HTMLMediaElement.cpp:2505 4 xul.dll mozilla::dom::HTMLMediaElement::AfterSetAttr dom/html/HTMLMediaElement.cpp:4498 5 xul.dll mozilla::dom::Element::SetAttrAndNotify dom/base/Element.cpp:2780 6 xul.dll mozilla::dom::Element::SetAttr dom/base/Element.cpp:2627 7 xul.dll mozilla::dom::HTMLAudioElement::Audio dom/html/HTMLAudioElement.cpp:66 8 xul.dll static bool mozilla::dom::HTMLAudioElement_Binding::_Audio dom/bindings/HTMLAudioElementBinding.cpp:70 9 xul.dll static bool InternalConstruct js/src/vm/Interpreter.cpp:674 ============================================================= this is a tab crash signature starting to show up across platforms in firefox 64. overall it's a fairly low volume crash though.
Comment 1•6 years ago
|
||
[Tracking Requested - why for this release]: Uptick, tracking flags, and adjacency to 64 feature policy suggest regression. Seems like `approver` is null here [1]. Missing null-check on line above calling ApproverDocOf() which appears capable of return null in two cases [2]. As for how to repro or why the uptick... I notice the lines directly above this again check for feature policy, and we recently enabled feature policy in Nightly (available with), maybe this changed things somehow? e.g. is this perhaps happening in a (sandboxed?) iframe with allow="camera;microphone" where things are now maybe more strict in edge cases? Regardless, adding a null-check would seem prudent, and might be all we need to stop this. [1] https://hg.mozilla.org/mozilla-central/annotate/c3f01d72374b19dab985700e9b839bb7fa956e77/dom/media/AutoplayPolicy.cpp#l94 [2] https://searchfox.org/mozilla-central/rev/17f55aee76b7c4610a974cffd3453454e0c8de7b/dom/media/AutoplayPolicy.cpp#39,45
Assignee: nobody → alwu
Blocks: 1497141
Has Regression Range: --- → no
Rank: 14
tracking-firefox64:
--- → ?
tracking-firefox65:
--- → ?
Priority: -- → P2
Comment 2•6 years ago
|
||
Sorry s/camera;microphone/autoplay/. Baku, do we implement feature policy for autoplay yet? [1] [1] https://searchfox.org/mozilla-central/rev/a3894a4dcfb5d42f2e6eee6cb9faf7141879ef1a/testing/web-platform/meta/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute.https.sub.html.ini#4
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 4•6 years ago
|
||
In order to avoid the nullptr crash when using `approver`.
Assignee | ||
Comment 5•6 years ago
|
||
There are two exactly same codes here, remove one of them.
Comment 6•6 years ago
|
||
Not tracking due to low volume; but feel free to request uplift after this is fixed on trunk.
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fe1869606e94 not allow autoplay if we don't have a document. r=cpearce https://hg.mozilla.org/integration/autoland/rev/65987ae1dfca remove redundant codes. r=cpearce
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fe1869606e94 https://hg.mozilla.org/mozilla-central/rev/65987ae1dfca
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Comment 9•6 years ago
|
||
Please request Beta approval on this when you get a chance.
Flags: needinfo?(alwu)
Assignee | ||
Comment 10•6 years ago
|
||
Comment on attachment 9024039 [details] Bug 1505494 - not allow autoplay if we don't have a document. [Beta/Release Uplift Approval Request] Feature/Bug causing the regression: block autoplay User impact if declined: user might get crash Is this code covered by automated tests?: No Has the fix been verified in Nightly?: No Needs manual test from QE?: No If yes, steps to reproduce: List of other uplifts needed: None Risk to taking this patch: Low Why is the change risky/not risky? (and alternatives if risky): This change is only adding a null check String changes made/needed: no
Flags: needinfo?(alwu)
Attachment #9024039 -
Flags: approval-mozilla-beta?
Comment 11•6 years ago
|
||
Comment on attachment 9024039 [details] Bug 1505494 - not allow autoplay if we don't have a document. fix a low volume crash with block autoplay, approved for 64.0b10
Attachment #9024039 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 12•6 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/466cc7c2f4c9
You need to log in
before you can comment on or make changes to this bug.
Description
•