Closed Bug 301353 Opened 20 years ago Closed 20 years ago

Components.utils.evalInSandbox does not report errors

Categories

(Core :: XPConnect, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: brendan, Assigned: brendan)

Details

Attachments

(1 file)

Even though it tries using the calling context's error reporter, the DOM's NS_ScriptErrorReporter will fail and bail out early for want of an nsJSContext private data record for the cx -- see the XXX comment at the top. This should be easy to fix. Patch in a bit. /be
Attached patch proposed fixSplinter Review
I fixed another bug: the gratuitous GC from JS_DestroyContext after each and every evalInSandbox, which was bloating up compile time horribly. /be
Attachment #189848 - Flags: superreview?(shaver)
Attachment #189848 - Flags: review?(shaver)
This may matter a lot to GreaseMonkey. /be
Status: NEW → ASSIGNED
Flags: blocking1.8b4+
Priority: -- → P1
Target Milestone: --- → mozilla1.8beta4
dbradley, feel free to r+ if you are around. /be
Comment on attachment 189848 [details] [diff] [review] proposed fix Triple-stamping=shaver.
Attachment #189848 - Flags: superreview?(shaver)
Attachment #189848 - Flags: superreview+
Attachment #189848 - Flags: review?(shaver)
Attachment #189848 - Flags: review+
Attachment #189848 - Flags: approval1.8b4+
Fixed. Could justify this on branches at some point, but not clear it would make GreaseMonkey's (or anyone else's) life simpler, given downrev 1.0.x clients in the field that would need a workaround (which we have, I worked it out with Aaron on IRC today -- don't ask!). /be
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
The compiler complains about this code: jsapi.c:4482: warning: control reaches end of non-void function Can we have a return value here, please?
I just fixed that, sorry for missing it on review.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: