JS component loader needs to use the JS context stack

RESOLVED FIXED

Status

()

RESOLVED FIXED
10 years ago
9 years ago

People

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

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Created attachment 329196 [details] [diff] [review]
Patch, v1

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+
Created attachment 330633 [details] [diff] [review]
Patch, v1.1

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+
Keywords: checkin-needed
Fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Keywords: checkin-needed

Comment 4

9 years ago
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.