Closed
Bug 1233862
Opened 9 years ago
Closed 9 years ago
Implement a WeakCache wrapper type to cause a thing to be swept automatically every GC
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
FIXED
mozilla48
People
(Reporter: terrence, Assigned: terrence)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
This is like WeakRef, but for things that are part of the runtime environment rather than discovered via tracing.
Attachment #8700200 -
Flags: review?(sphink)
Comment 1•9 years ago
|
||
Comment on attachment 8700200 [details] [diff] [review]
impl_WeakCache-v0.diff
Review of attachment 8700200 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry, this slipped through the cracks.
::: js/src/jsapi-tests/testGCWeakCache.cpp
@@ +39,5 @@
> + CHECK(cache.has(tenured2));
> + CHECK(cache.has(nursery1));
> + CHECK(cache.has(nursery2));
> +
> + // Since this relies on the UID map, we cannot check the non-existance
*nonexistence
@@ +40,5 @@
> + CHECK(cache.has(nursery1));
> + CHECK(cache.has(nursery2));
> +
> + // Since this relies on the UID map, we cannot check the non-existance
> + // of a pointer in the map -- see below for that.
You don't want to do it via CHECK(cache.count() == 2)?
Attachment #8700200 -
Flags: review?(sphink) → review+
Assignee | ||
Comment 2•9 years ago
|
||
Assignee | ||
Comment 3•9 years ago
|
||
Rebased to use the new Policy stuff. Quite a bit cleaner now. Certainly cleaner to use. I'm going to carry the r+.
Attachment #8700200 -
Attachment is obsolete: true
Attachment #8740182 -
Flags: review+
Assignee | ||
Comment 4•9 years ago
|
||
Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/58c36d9ae2af72144b7dd995b4f2344f543c0f7d
Bug 1233862 - Add a WeakCache builtin to automatically manage sweeping; r=sfink
Comment 6•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•