Closed Bug 786068 Opened 12 years ago Closed 12 years ago

make JS_EnterCrossCompartmentCall infallible

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: luke, Assigned: luke)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
There isn't any need to malloc storage when there is only one meaningful word that needs to be saved.  Also rename to JS_(Enter|Leave)Compartment (since I am auditing all the call-sites anyway).
Attachment #655787 - Flags: review?(sphink)
Attached patch patchSplinter Review
Now with comments
Assignee: general → luke
Attachment #655787 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #655787 - Flags: review?(sphink)
Attachment #655799 - Flags: review?(sphink)
Comment on attachment 655799 [details] [diff] [review]
patch

Review of attachment 655799 [details] [diff] [review]:
-----------------------------------------------------------------

Wow, that is so much nicer.

I'm a little surprised at how few uses there were.

::: js/src/jsdbgapi.h
@@ +12,5 @@
>   */
>  #include "jsapi.h"
>  #include "jsprvtd.h"
>  
> +#if defined(DEBUG) && defined(__cplusplus)

This makes js_DumpBacktrace(cx) DEBUG-only and compiled as a C++ symbol. Previously it was unconditional and compiled as a C symbol. Was that change intentional?
Attachment #655799 - Flags: review?(sphink) → review+
(In reply to Steve Fink [:sfink] from comment #2)
Oops, no.  I don't really think it matters, but I might as well put it back.
https://hg.mozilla.org/mozilla-central/rev/d65863fbb129
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: