Closed Bug 443869 Opened 16 years ago Closed 16 years ago

Fix some request model badness in nsDOMClassInfo

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch (obsolete) — Splinter Review
Working on bug 437152 I found that nsDOMClassInfo needs two JSAutoRequests and one JSAutoSuspendRequest (when switching contexts on the stack). Patch attached.
Attachment #328294 - Flags: superreview?(jst)
Attachment #328294 - Flags: review?(jst)
Assignee: nobody → bent.mozilla
Needs the patch for bug 443870.
Depends on: 443870
Version: unspecified → Trunk
Comment on attachment 328294 [details] [diff] [review]
Patch

- In nsWindowSH::NewResolve():

+      JSAutoRequest ar(cx);
+
       *_retval = (::JS_ValueToId(cx, id, &interned_id) &&
                   OBJ_LOOKUP_PROPERTY(cx, innerObj, interned_id, &pobj,
                                       &prop));

I don't see any context switching code above this, so I'm wondering if this request really should be in the code that ends up calling into here w/o actually being in a request, rather than here?

+        JSAutoRequest ar(cx);
+
         *_retval = ::JS_DefineElement(cx, obj, JSVAL_TO_INT(id), JSVAL_VOID,
                                       nsnull, nsnull, 0);

Same thing here.
 
r- based on that, the rest looks good. If this turns out to be the right thing to do, then that's fine as long as we understand (and comment) why the auto request needs to be here.
Attachment #328294 - Flags: superreview?(jst)
Attachment #328294 - Flags: superreview-
Attachment #328294 - Flags: review?(jst)
Attachment #328294 - Flags: review-
Attached patch PatchSplinter Review
I can no longer hit the request level assertion there so I don't know what's going on. Let's just hope it magically got fixed ;)
Attachment #328294 - Attachment is obsolete: true
Attachment #333316 - Flags: superreview?(jst)
Attachment #333316 - Flags: review?(jst)
Attachment #333316 - Flags: superreview?(jst)
Attachment #333316 - Flags: superreview+
Attachment #333316 - Flags: review?(jst)
Attachment #333316 - Flags: review+
Pushed changeset 6083213f3de2.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: