DispatchCertVerificationResult addrefs a JS listener off the main thread

RESOLVED FIXED in mozilla24

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jdm, Assigned: jdm)

Tracking

unspecified
mozilla24
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The stack trace on Mac is:
Frame 	Module 	Signature 	Source
0 	XUL 	nsXPCWrappedJS::AddRef 	js/xpconnect/src/XPCWrappedJS.cpp:155
1 	XUL 	nsCertVerificationJob::Run 	obj-firefox/x86_64/dist/include/nsCOMPtr.h:566
2 	XUL 	nsCertVerificationThread::Run 	security/manager/ssl/src/nsCertVerificationThread.cpp:142
3 	libnss3.dylib 	null_signal_handler 	
4 	libnss3.dylib 	_pt_root 	
5 	libsystem_c.dylib 	libsystem_c.dylib@0x147a2 	
6 	libsystem_c.dylib 	libsystem_c.dylib@0x11e1 	
7 	libnss3.dylib 	null_signal_handler
Assignee: nobody → josh
Comment on attachment 751164 [details] [diff] [review]
Make certificate verification avoid addrefing JS-wrapped listeners off the main thread.

Review of attachment 751164 [details] [diff] [review]:
-----------------------------------------------------------------

This seems OK to me. nsCertVerificationJob::Run does always dispatch the callback to the main thread.

::: security/manager/ssl/src/nsNSSCertificate.cpp
@@ +1409,2 @@
>  nsNSSCertificate::RequestUsagesArrayAsync(nsICertVerificationListener *aResultListener)
>  {

NS_ENSURE_TRUE(NS_IsMainThread(), NS_ERROR_NOT_SAME_THREAD) here.
Attachment #751164 - Flags: review?(bsmith) → review+
https://hg.mozilla.org/mozilla-central/rev/a7aa62774568
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.