Closed
Bug 342763
Opened 18 years ago
Closed 18 years ago
JavaScript errors in scripts in prefpanes not displayed in console
Categories
(Toolkit :: Preferences, defect, P3)
Toolkit
Preferences
Tracking
()
RESOLVED
DUPLICATE
of bug 309814
mozilla1.9alpha1
People
(Reporter: Waldo, Assigned: asaf)
Details
Attachments
(1 file)
3.88 KB,
patch
|
Gavin
:
first-review-
|
Details | Diff | Splinter Review |
This makes fixing bug 340677 a bit more annoying, although so far I've been lucky and mostly just had misplaced or missing commas in object literals which I can find without seeing a useful JS error for them
Comment 1•18 years ago
|
||
Related to bug 324142 ?
Assignee | ||
Comment 2•18 years ago
|
||
Assignee: nobody → mano
Status: NEW → ASSIGNED
Attachment #241883 -
Flags: first-review?(gavin.sharp)
Assignee | ||
Updated•18 years ago
|
Priority: -- → P3
Target Milestone: --- → mozilla1.9alpha1
Comment 3•18 years ago
|
||
Comment on attachment 241883 [details] [diff] [review] patch >Index: toolkit/content/widgets/preferences.xml >+ var event = document.createEvent("Events"); >+ event.initEvent(aEventName, true, true); >+ >+ // handle dom event handlers >+ var noCancel = aTarget.dispatchEvent(event); >+ >+ // handle any xml attribute event handlers >+ var handler = aTarget.getAttribute("on" + aEventName)) extra ")", no ";" >+ if (handler != "") { Why not just if (handler)? >+ var fn = new Function ("event", handler); >+ var rv = fn.call(aTarget, event); >+ if (rv == false) Get rid of rv and just use |if (fn.call(aTarget, event) == false)| ? >+ noCancel = false; > } >- return false; >+ return noCancel; Have you tested that any exceptions thrown by the handlers are properly reported? Maybe it's worth catching the exception here and using Component.utils.reportError with a more descriptive message?
Attachment #241883 -
Flags: first-review?(gavin.sharp) → first-review-
Assignee | ||
Comment 4•18 years ago
|
||
*** This bug has been marked as a duplicate of 309814 ***
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•