Closed Bug 444880 Opened 16 years ago Closed 16 years ago

JS component loader needs to use the JS context stack

Categories

(Core :: XPConnect, 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, v1 (obsolete) — Splinter Review
JS component loader needs to use the JS context stack. Currently it makes a new request and doesn't suspend any that are on the stack which causes deadlock. Patch attached.
Attachment #329196 - Flags: superreview?(jst)
Attachment #329196 - Flags: review?(jst)
Version: unspecified → Trunk
Comment on attachment 329196 [details] [diff] [review]
Patch, v1

- In JSCLContextHelper::~JSCLContextHelper():

+
+    JSContext* dummy;
+    mContextStack->Pop(&dummy);

It's "ok" to pass null to Pop() here, so no need for the dummy variable.

r+sr=jst
Attachment #329196 - Flags: superreview?(jst)
Attachment #329196 - Flags: superreview+
Attachment #329196 - Flags: review?(jst)
Attachment #329196 - Flags: review+
Attached patch Patch, v1.1Splinter Review
Removed the dummy var.
Assignee: nobody → bent.mozilla
Attachment #329196 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #330633 - Flags: superreview+
Attachment #330633 - Flags: review+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
This change is now causing a crash when the JS component loader is called from a non-JS thread. Full details posted at:
https://bugzilla.mozilla.org/show_bug.cgi?id=419192#c31

Can a check be done, and create a new request (like was being done before this patch) in the situation when there is no existing JS context stack (or whatever the problem is - no js stack for the current thread)?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: