Closed
Bug 584793
Opened 14 years ago
Closed 9 years ago
ReferenceErrors in streamlistener callbacks are swallowed
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: jdm, Unassigned)
References
Details
(Whiteboard: [necko-backlog])
Attachments
(1 file)
3.34 KB,
patch
|
jduell.mcbugs
:
review+
|
Details | Diff | Splinter Review |
This is extremely frustrating, as the callbacks fail silently. I had |do_check_eq(this._variable, NONEXISTANT_CONSTANT)| which gave me no output.
Reporter | ||
Comment 1•14 years ago
|
||
Actually, I suppose the real problem is that ReferenceErrors are not detected or something, because when I changed NONEXISTANT_CONSTANT to an actual constant, the test fails just fine.
Summary: Test failures in streamlistener callbacks are swallowed → ReferenceErrors in streamlistener callbacks are swallowed
Reporter | ||
Comment 2•14 years ago
|
||
So there's a reason that the default ChannelListener callbacks are all wrapped in try/catch blocks. I propose we implement a ChannelForwarder that takes a listener and forwards all calls to it safely, so that we can write custom listeners without the try/catch annoyances.
Component: XPCShell Harness → Networking
Product: Testing → Core
QA Contact: xpcshellharness → networking
Reporter | ||
Comment 3•14 years ago
|
||
Reporter | ||
Comment 4•14 years ago
|
||
Comment on attachment 477553 [details] [diff] [review]
Add ChannelForwarder to make use of custom channel listeners easier in network xpcshell tests.
Here's what I had in mind.
Attachment #477553 -
Flags: review?(jduell.mcbugs)
Comment 5•14 years ago
|
||
Comment on attachment 477553 [details] [diff] [review]
Add ChannelForwarder to make use of custom channel listeners easier in network xpcshell tests.
"ChannelForwarder" is not a very descriptive name. How about "ListenerExceptionReporter"? Either way, couldn't hurt to add a comment like this:
// Exceptions from OnStart/Data/Stop are silently eaten by default: this class
// converts them to xpcshell errors.
>+function ChannelForwarder(listener) {
>+ this._listener = listener;
>+}
Attachment #477553 -
Flags: review?(jduell.mcbugs) → review+
Comment 6•9 years ago
|
||
there is a r+ patch here.. should it be checked in? should the bug be otherwise closed?
Flags: needinfo?(jduell.mcbugs)
Whiteboard: [necko-backlog]
Reporter | ||
Comment 7•9 years ago
|
||
The fact that this is an opt-in tool means that nobody will use it, in all likelihood. I don't think it's worth trying to pursue this solution.
Comment 8•9 years ago
|
||
OK, then.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(jduell.mcbugs)
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•