Closed
Bug 299741
Opened 19 years ago
Closed 19 years ago
[FIXr]JS exceptions in XBL constructors not always reported immediately
Categories
(Core :: XBL, defect, P1)
Core
XBL
Tracking
()
RESOLVED
FIXED
mozilla1.8beta3
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(2 files)
(deleted),
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
chofmann
:
approval1.8b3+
|
Details | Diff | Splinter Review |
If we're inside some JS and call into frame construction and fire XBL
constructors, errors won't get reported immediately because the XBL constructor
code doesn't notify XPConnect about the pending exception.
Assignee | ||
Comment 1•19 years ago
|
||
The testcase, by the way, is in bug 299231 -- the exception thrown by the
constructor for the surroundContents case doesn't show up until later (eg until
the page is reloaded).
Assignee | ||
Updated•19 years ago
|
Priority: -- → P1
Target Milestone: --- → mozilla1.8beta3
Assignee | ||
Comment 2•19 years ago
|
||
The other option is to move NotifyXPCIfExceptionPending from being a static
method in nsJSEnvironment to being a class static in nsContentUtils and use it
here. jst, let me know if you'd prefer that?
Attachment #188329 -
Flags: superreview?(jst)
Attachment #188329 -
Flags: review?(jst)
Comment 3•19 years ago
|
||
Comment on attachment 188329 [details] [diff] [review]
Proposed fix
r+sr=jst, but yeah, I'd rather see this code shared in nsContentUtils (r+sr
still applies if you move NotifyXPCIfExceptionPending()).
Attachment #188329 -
Flags: superreview?(jst)
Attachment #188329 -
Flags: superreview+
Attachment #188329 -
Flags: review?(jst)
Attachment #188329 -
Flags: review+
Assignee | ||
Comment 4•19 years ago
|
||
Requesting approval. This is a very safe patch that makes us actually report
JS exceptions in XBL constructors/destructors when they happen.
Attachment #188398 -
Flags: approval1.8b3?
Assignee | ||
Updated•19 years ago
|
Summary: [FIX]JS exceptions in XBL constructors not always reported immediately → [FIXr]JS exceptions in XBL constructors not always reported immediately
Comment 5•19 years ago
|
||
Comment on attachment 188398 [details] [diff] [review]
With the code moved to nsContentUtils
a=chofmann
Attachment #188398 -
Flags: approval1.8b3? → approval1.8b3+
Assignee | ||
Comment 6•19 years ago
|
||
Fixed for 1.8b3
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•