Closed
Bug 274300
Opened 21 years ago
Closed 20 years ago
Hooks should not be able to break event processing
Categories
(Other Applications Graveyard :: ChatZilla, defect)
Other Applications Graveyard
ChatZilla
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bugzilla-mozilla-20000923, Assigned: bugzilla-mozilla-20000923)
References
()
Details
(Whiteboard: [cz-patch][cz-0.9.68.4])
Attachments
(1 file, 1 obsolete file)
3.14 KB,
patch
|
rginda
:
review+
benjamin
:
approval1.8b4+
|
Details | Diff | Splinter Review |
Currently hooks are pretty trusted things - throw a JS exception and the main
event loop in ChatZilla stops. V bad.
My proposal is to wrap the call to the hook's function in a try/catch, and if an
exception occurs use dd() to log the exception to the console, and *continue*
processing other hooks (unlike returning false).
Assignee | ||
Comment 1•21 years ago
|
||
I've also noticed the return value of onHook is completely ignored! Perhaps that
should be fixed too, so hooks can /actually/ stop events.
Assignee | ||
Updated•21 years ago
|
Assignee: rginda → silver
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•20 years ago
|
Whiteboard: [0.9.68.4]
Assignee | ||
Comment 2•20 years ago
|
||
Attachment #190305 -
Flags: review?(rginda)
Comment 3•20 years ago
|
||
Comment on attachment 190305 [details] [diff] [review]
Catch and handle exceptions in hooks
I'd suggest you move the rv test outside of the try/catch block, so that only
"rv = hooks[h].f(e);" is left inside.
r=rginda with that change.
Assignee | ||
Updated•20 years ago
|
Attachment #190305 -
Flags: review?(rginda)
Assignee | ||
Comment 4•20 years ago
|
||
Attachment #190305 -
Attachment is obsolete: true
Attachment #190340 -
Flags: review?(rginda)
Comment 5•20 years ago
|
||
Comment on attachment 190340 [details] [diff] [review]
Take two
r=rginda
Attachment #190340 -
Flags: review?(rginda) → review+
Assignee | ||
Updated•20 years ago
|
Attachment #190340 -
Flags: approval1.8b4?
Updated•20 years ago
|
Attachment #190340 -
Flags: approval1.8b4? → approval1.8b4+
Assignee | ||
Comment 6•20 years ago
|
||
Checked in --> FIXED.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•20 years ago
|
Whiteboard: [0.9.68.4] → [cz-patch][0.9.68.4]
Assignee | ||
Updated•20 years ago
|
Whiteboard: [cz-patch][0.9.68.4] → [cz-patch][cz-0.9.68.4]
Updated•4 months ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•