Closed Bug 1547677 Opened 5 years ago Closed 5 years ago

Rename the ReadBarriered wrapper type to WeakHeapPtr to better describe its purpose

Categories

(Core :: JavaScript: GC, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(2 files)

The name ReadBarriered is unclear as to its purpose. Calling this WeakPtr instead would help document the reason behind its use.

Could this be something like WeakGCPtr? We already have a WeakPtr in mfbt, and an nsWeakPtr in XPCOM.

(In reply to Andrew McCreight [:mccr8] from comment #2)

Could this be something like WeakGCPtr? We already have a WeakPtr in mfbt, and an nsWeakPtr in XPCOM.

Sure, I can make this WeakHeapPtr instead.

Attachment #9061323 - Attachment description: Bug 1547677 - Rename the ReadBarriered wrapper type to WeakPtr r=sfink? → Bug 1547677 - Rename the ReadBarriered wrapper type to WeakHeapPtr r=sfink

I removed WeakRef since this is already very close to WeakHeapPtr and is an alias of it. I think having the two is more confusing than using the same name for both (the difference is whether you trace it with TraceWeakEdge or sweep it in a more manual fashion).

Depends on D29180

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c6640ffe809f
Rename the ReadBarriered wrapper type to WeakHeapPtr and remove WeakRef r=sfink
Summary: Rename the ReadBarriered wrapper type to WeakPtr to better describe its purpose → Rename the ReadBarriered wrapper type to WeakHeapPtr to better describe its purpose
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: