Closed Bug 1592496 Opened 5 years ago Closed 5 years ago

Add move constructor&assignment to nsMainThreadPtrHandle

Categories

(Core :: XPCOM, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

Details

Attachments

(2 files)

Add move constructor&assignment to nsMainThreadPtrHandle to avoid a Release+AddRef when moving the RefPtr member.

Small changes:

  • Ordered #includes.
  • Fixed some comments (obsolete remarks, or typos).
  • Set nsMainThreadPtrHolder::mRawPtr from constructor initializers.
  • Modernized nsMainThreadPtrHolder copy-prevention.
  • Made nsMainThreadPtrHandle::get() const (consistent with others).
  • Moved nsMainThreadPtrHandle private member to the end.
  • Removed now-unused mozilla::PtrHolder and mozilla::PtrHandle aliases.

Depends on D51055

Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/535dce0633af
Add move constructor and assignment to nsMainThreadPtrHandle - r=froydnj
https://hg.mozilla.org/integration/autoland/rev/3dcba4d6c816
nsProxyRelease.h clean-up - r=froydnj
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: