Open Bug 328902 Opened 20 years ago Updated 3 years ago

Sort out error-reporting behavior of EvaluateString callers

Categories

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

defect

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

References

()

Details

We have three callers of EvaluateString that are inside Gecko: 1) nsScriptLoader 2) javascript: URLs 3) timeouts/intervals Right now, if the string passed to EvaluateString throws we set the "exception is pending" boolean on the current XPCCallContext and return. This misses reporting errors in many cases (like the example in the URL field). So for each of those three cases I think we need to decide on the following: 1) Should an exception from the JS in question propagate to the caller? That is, should setting window.location to a javascript: URI that throws rethrow that exception in the calling context? Should appending a <script> node that contains text that throws an exception throw from appendChild? That sort of thing. 2) Based on the answers to #1 figure out how to implement. I suspect that no matter what we'll need to remove the NotifyXPCIfExceptionPending() call from EvaluateString, since it doesn't, generally speaking, do the right thing. See bug 328851.
Blocks: 328851
Flags: blocking1.9a1?
OS: Linux → All
Hardware: PC → All
Version: 1.8 Branch → Trunk
Flags: blocking1.9a1? → blocking1.9-
Whiteboard: [wanted-1.9]
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Assignee: general → nobody
QA Contact: ian → general
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.