Closed
Bug 60303
Opened 24 years ago
Closed 24 years ago
xpconnect must bracket calls to natives with JS_{Suspend,Resume}Request
Categories
(Core :: XPConnect, defect, P3)
Core
XPConnect
Tracking
()
VERIFIED
FIXED
People
(Reporter: jband_mozilla, Assigned: jband_mozilla)
References
Details
Attachments
(1 file)
1.48 KB,
patch
|
Details | Diff | Splinter Review |
see: "Additional Comments From brendan@mozilla.org 2000-11-15 23:04" in bug 54743
XPConnect risks JS deadlock by calling from JS into potentially blocking native
code without suspending the Request.
I'll attach a proposed fix.
Assignee | ||
Comment 1•24 years ago
|
||
Assignee | ||
Comment 2•24 years ago
|
||
Oops... fixed the comment:
< // JS Requests. Calling JS_SuspendRequest with a non-zero requestDepth
> // JS Requests. Calling JS_SuspendRequest with a zero requestDepth
Status: NEW → ASSIGNED
Comment 3•24 years ago
|
||
sr=brendan@mozilla.org; mccabe, can you r=? I'm optimizing an sr before an r
cuz the patch is straightforward.
jband, do you think JS_SuspendRequest should defend against being called not in
a request?
/be
Assignee | ||
Comment 4•24 years ago
|
||
It could help find api usage errors if JS_EndRequest asserted cx->requestDepth
!= 0 before decrementing it. I don't think non-debug checks are good here - if
the calls aren't balanced then no help form the api will really help.
Comment 6•24 years ago
|
||
r=mccabe.
One place has a comment to the effect that the DOM breaks the rules. Does it
make sense to fix this? (Would it be costly?)
Assignee | ||
Comment 7•24 years ago
|
||
fixes checked in.
The DOM will stop breaking the request rules when it is converted to use xpconnect!
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•