Closed Bug 511562 Opened 10 years ago Closed 9 years ago

errors thrown event listeners never reach the error console

Categories

(Firefox :: General, defect, major)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: jared, Unassigned)

Details

(Whiteboard: [CLOSEME 2011-1-1])

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9
Build Identifier: Firefox 3.5.2

When the following code is run in Firefox < 3.5 the error shows up in the console. when run in Firefox >3.5 the error never bubbles up. 

element = document.createElement('div');
var responder = function(){
  console.log('responder run');
  throw new Error('i never reach the console in FF3.5');
}
element.addEventListener("dataavailable", responder, false);

event = document.createEvent('HTMLEvents');
event.initEvent('dataavailable', true, true);
element.dispatchEvent(event);

Reproducible: Always

Steps to Reproduce:
element = document.createElement('div');
var responder = function(){
  console.log('responder run');
  throw new Error('i never reach the console in FF3.5');
}
element.addEventListener("dataavailable", responder, false);

event = document.createEvent('HTMLEvents');
event.initEvent('dataavailable', true, true);
element.dispatchEvent(event);
Actual Results:  
console contains "responder run" but no error

Expected Results:  
console to contain "responder run" and [Exception... "'Error: i never reach the console in FF3.5' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "JS frame :: http://local.rupture.com/javascripts/application.js :: fire :: line 5155" data: no]
Reporter, are you still seeing this issue with Firefox 3.6.12 or later in safe mode? If not, please close. These links can help you in your testing.
http://support.mozilla.com/kb/Safe+Mode
http://support.mozilla.com/kb/Managing+profiles
Also, please consider using the most recent Firefox 4 beta build, your bug may be resolved there.
Whiteboard: [CLOSEME 2011-1-1]
No reply, INCOMPLETE. Please retest with Firefox 3.6.13 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.