Closed
Bug 983641
Opened 11 years ago
Closed 11 years ago
Several DOM Apps tests seem to swallow errors
Categories
(Core Graveyard :: DOM: Apps, defect)
Core Graveyard
DOM: Apps
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla31
People
(Reporter: Yoric, Assigned: marco)
Details
Attachments
(1 file, 1 obsolete file)
|
7.81 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
Logs of DOM Apps tests indicate a few "Got exception:", without details.
http://dxr.mozilla.org/mozilla-central/search?q=%22Got+exception%3A%22&case=true
This is bad for several reasons:
1. if I understand this code correctly, it simply eats errors, even fatal ones;
2. dump() is bad form, we should rather use info() or ok().
| Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(mar.castelluccio)
| Assignee | ||
Comment 1•11 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] (please use "needinfo?") from comment #0)
> Logs of DOM Apps tests indicate a few "Got exception:", without details.
>
> http://dxr.mozilla.org/mozilla-central/
> search?q=%22Got+exception%3A%22&case=true
>
> This is bad for several reasons:
> 1. if I understand this code correctly, it simply eats errors, even fatal
> ones;
> 2. dump() is bad form, we should rather use info() or ok().
We should fix this, but I think that when an exception occurs the tests don't call |finish| and so they fail because of timeouts.
Flags: needinfo?(mar.castelluccio)
| Reporter | ||
Comment 2•11 years ago
|
||
Based on a quick read of a recent log, I have the impression that this is not the case.
| Assignee | ||
Comment 3•11 years ago
|
||
With this patch we explicitly fail these tests in case of exceptions instead of letting them fail for timeouts.
Assignee: nobody → mar.castelluccio
Status: NEW → ASSIGNED
| Reporter | ||
Comment 4•11 years ago
|
||
Comment on attachment 8391181 [details] [diff] [review]
Patch
Why is it useful to print StopIteration?
| Assignee | ||
Comment 5•11 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] (please use "needinfo?") from comment #2)
> Based on a quick read of a recent log, I have the impression that this is
> not the case.
If you throw inside a generator, the next call to next() should throw StopIteration.
For example:
function generator() {
yield 0;
referror
yield 1;
}
var gen = generator();
gen.next() => 0
gen.next() => Reference Error: referror is not defined
gen.next() => StopIteration
So the code after |referror| doesn't get executed.
Anyway it's quite subtle, so it's better to explicitly fail.
(In reply to David Rajchenbach Teller [:Yoric] (please use "needinfo?") from comment #4)
> Comment on attachment 8391181 [details] [diff] [review]
> Patch
>
> Why is it useful to print StopIteration?
No particular reason, I've left it just because it doesn't do any harm.
| Reporter | ||
Comment 6•11 years ago
|
||
> (In reply to David Rajchenbach Teller [:Yoric] (please use "needinfo?") from
> comment #4)
> > Comment on attachment 8391181 [details] [diff] [review]
> > Patch
> >
> > Why is it useful to print StopIteration?
>
> No particular reason, I've left it just because it doesn't do any harm.
Well, it adds noise to the logs and it made me think that there was an error :)
I believe that you should remove it.
| Assignee | ||
Comment 7•11 years ago
|
||
I think this is the cleanest way:
- Remove the redundant messages ("Got exception: Stop iteration" and "All done" are useless).
- Catch only StopIteration exceptions, letting the test infrastructure handle other exceptions.
Attachment #8391181 -
Attachment is obsolete: true
| Assignee | ||
Updated•11 years ago
|
Attachment #8391755 -
Flags: review?(fabrice)
Comment 8•11 years ago
|
||
Comment on attachment 8391755 [details] [diff] [review]
Patch
Review of attachment 8391755 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm, but push to try before landing.
Attachment #8391755 -
Flags: review?(fabrice) → review+
| Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 9•11 years ago
|
||
Comment 10•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla31
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•