Closed Bug 1029150 Opened 10 years ago Closed 10 years ago

Remove dangerous public destructor of nsCryptoRunnable

Categories

(Core :: DOM: Security, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: bjacob, Assigned: mccr8)

References

Details

Attachments

(1 file)

In bug 1028588 we removed dangerous public destructors of XPCOM-refcounted classes outside of a finite whitelist, see HasDangerousPublicDestructor. Now we are going over the entries in this whitelist.

One of them is: nsCryptoRunnable
No longer depends on: 1028588
Assignee: nobody → continuation
Comment on attachment 8464347 [details] [diff] [review]
Remove dangerous public destructor of nsCryptoRunnable.

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

Great - thanks for doing this.

::: security/manager/ssl/src/nsCrypto.cpp
@@ +2043,5 @@
>    if (!aJsCallback.IsVoid()) {
>      args->m_jsCallback = aJsCallback;
>    }
>  
> +  nsRefPtr<nsCryptoRunnable> cryptoRunnable = new nsCryptoRunnable(args);

This is something I don't know myself, but is it preferable to use the assignment operator or the constructor (like so: 'nsRefPtr<nsCryptoRunnable> cryptoRunnable(new nsCryptoRunnable(args));') in cases like this?
Attachment #8464347 - Flags: review?(dkeeler) → review+
https://hg.mozilla.org/mozilla-central/rev/06f72ed86256
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: