Open Bug 878325 Opened 9 years ago Updated 3 years ago

XUL template builder needs to do a better job propagating exceptions


(Core :: DOM: Core & HTML, defect)

Not set




(Reporter: bholley, Unassigned)




(3 files)

I'm doing some work that causes WrapNative to throw more often, in cases where it should. But it's uncovered a few consumers that don't do a good job of propagating exceptions all the way up. This stuff is one of them.
Summary: XUL template build needs to do a better job propagating exceptions → XUL template builder needs to do a better job propagating exceptions
Comment on attachment 756837 [details] [diff] [review]
Part 1 - Propagate exceptions out of CreateTemplateBuilder and LoadDataSources. v1

Attachment #756837 - Flags: review?(bzbarsky) → review+
Comment on attachment 756838 [details] [diff] [review]
Part 2 - Propagate exceptions out of ResolveForwardReferences. v1

Let's hope this doesn't break some weird edge case....
Attachment #756838 - Flags: review?(bzbarsky) → review+
Hm, so this busted two tests:


It looks like these things are both designed to throw, but are somehow getting tripped up where they weren't before.

I really don't know enough about this code to debug it though. Enn, can you apply the patches and have a look?
Flags: needinfo?(enndeakin)
The code here has its own logging which one can enable, The two specific errors being tested for here should really just silently fail when the logging is disabled.
Flags: needinfo?(enndeakin)
However, since opening the test seems to cause the test's page to never stop loading, there is some other bug here as well. I assume an error result from XULDocument::ResolveForwardReferences isn't causing some cleanup to occur properly.
If you squelch exceptions, you need to call JS_ClearPendingException.
Assignee: bobbyholley → nobody
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.