Closed Bug 790577 Opened 12 years ago Closed 8 years ago

TypeError: event.item is undefined in chrome://global/content/bindings/videocontrols.xml when playing audio/video is removed from DOM

Categories

(Toolkit :: Video/Audio Controls, defect)

13 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: trust, Unassigned)

References

Details

(Keywords: regression, testcase)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1

Steps to reproduce:

Issue found in latest release build of Firefox - 15.0.1

Example at: http://jsfiddle.net/tr00st/Ezepx/
Example includes two buttons - "Break" is an instant test, as it plays then deleted. "Just Delete" just deletes, to demonstrate that it's not just occurring when the video's removed straight after playing is started.

Steps

Add a handler to window.onerror:
window.onerror = function (a,b,c) {
    alert("a: "+a+"\nb: "+b+"\nc: "+c);
}

Add an HTML5 Video or Audio tag to the page:
<video id="vid1" class="vid" controls><source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv" type="video/ogg" /></video>


Start the video playing - either click play or in code:
var vid = document.getElementById("vid1");
vid.play();

Remove the video from the DOM:
var vid = document.getElementById("vid1");
vid.parentNode.removeChild(vid);


Actual results:

An error is received by the document handler:

a: TypeError: event.item is undefined
b: chrome://global/content/bindings/videocontrols.xml
c: 643


Expected results:

The error should not be passed to user code.
Mozregression range:

m-c
good=2012-02-27
bad=2012-02-28
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d1b2fd680235&tochange=7ce4d9b55863

m-i
good=2012-02-27
bad=2012-02-28
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=86f8ab61e755&tochange=eac2ff42164d

Suspected bug:
David Seifried — Bug 702161 - videocontrols.xml has anonymous function event listeners that are added but never removed. r=dolske
Blocks: 702161
Status: UNCONFIRMED → NEW
Component: Video/Audio → Video/Audio Controls
Ever confirmed: true
Keywords: regression, testcase
Product: Core → Toolkit
Version: 15 Branch → 13 Branch
Summary: window.onerror receives error when playing audio/video is removed from DOM → TypeError: event.item is undefined in chrome://global/content/bindings/videocontrols.xml when playing audio/video is removed from DOM
Reproduced the initial issue on Firefox 15.0.1 (Build ID: 20120905151427) by using the test case attached in the Description. The error is no longer reproducible on the latest Nightly (20160713030216), therefore I'm setting the status of this issue to Resolved Worksforme. 

If anyone thinks differently, please feel free to reopen the issue.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.