Closed
Bug 635087
Opened 14 years ago
Closed 14 years ago
nsCryptoRunnable::Run leaks JSPrincipals
Categories
(Core :: Security: PSM, defect)
Core
Security: PSM
Tracking
()
RESOLVED
FIXED
People
(Reporter: mwu, Assigned: mwu)
References
Details
(Keywords: memory-leak)
Attachments
(1 file, 1 obsolete file)
1.34 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #513298 -
Flags: review?(kaie)
Assignee | ||
Updated•14 years ago
|
Attachment #513298 -
Flags: review?(kaie) → review?(jst)
Comment 1•14 years ago
|
||
Comment on attachment 513298 [details] [diff] [review]
Fix
Good catch! r=jst, but while you're here, want to add:
JSAutoEnterCompartment ac;
if (!ac.enter(cx, realObj)) {
return NS_ERROR_FAILURE;
}
right below the JSAutoRequest, and move both lines up top so that doesn't also leak principals? That way we'll ensure that the JS_EvaluateScriptForPrincipals() call always runs in the right compartment.
Attachment #513298 -
Flags: review?(jst) → review+
Assignee | ||
Comment 2•14 years ago
|
||
Like this? Unfortunately don't know enough about the js context stack to know if this is ok.
Attachment #513298 -
Attachment is obsolete: true
Attachment #520778 -
Flags: review?(jst)
Comment 3•14 years ago
|
||
Comment on attachment 520778 [details] [diff] [review]
Fix, v2
Yup, that looks right to me. Thanks! r=jst
Attachment #520778 -
Flags: review?(jst) → review+
Assignee | ||
Comment 4•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•