Replace finalization iterator with multiple callback calls
Categories
(Core :: JavaScript: GC, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(1 file)
Implement the spec changes from https://github.com/tc39/proposal-weakrefs/pull/187.
Assignee | ||
Comment 1•5 years ago
|
||
Implements the spec changes from: https://github.com/tc39/proposal-weakrefs/pull/187
The spec change removes the FinalizationRegistryCleanupIterator
in favour of
calling the clean-up callback for each finalised value. It also allows to call
cleanupSome()
within the callback function.
FinalizationRegistryObject::cleanupQueuedRecords()
has been changed to iterate
from back to front, because this allows us to call GCVector::popCopy()
, which
makes it more efficient to remove entries from the records
vector.
Depends on D70820
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Hi Jon, just a quick NI, because I'm not sure if you've seen my response to https://phabricator.services.mozilla.com/D70821#inline-416401.
Comment 5•5 years ago
|
||
Backed out for mochitest failures on test_finalizationRegistry.html
backout: https://hg.mozilla.org/integration/autoland/rev/1e2ce9981292d4160a966f4aa4c54be5a155e136
push: Failures have appeared on a subsequent push: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedTaskRun=Z4Lehi9MSPu4oognz6Pv2w-0&revision=d6525047e9415413285449e849c06c6630f1e53c&searchStr=mochitest-plain
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=302106694&repo=autoland&lineNumber=7692
[task 2020-05-13T13:24:04.104Z] 13:24:04 INFO - TEST-PASS | js/xpconnect/tests/mochitest/test_finalizationRegistry.html | undefined assertion name
[task 2020-05-13T13:24:04.104Z] 13:24:04 INFO - TEST-PASS | js/xpconnect/tests/mochitest/test_finalizationRegistry.html | undefined assertion name
[task 2020-05-13T13:24:04.104Z] 13:24:04 INFO - Buffered messages finished
[task 2020-05-13T13:24:04.104Z] 13:24:04 INFO - TEST-UNEXPECTED-FAIL | js/xpconnect/tests/mochitest/test_finalizationRegistry.html | uncaught exception - TypeError: i is not iterable at go/registry2<@http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/test_finalizationRegistry.html:19:68
[task 2020-05-13T13:24:04.104Z] 13:24:04 INFO -
[task 2020-05-13T13:24:04.104Z] 13:24:04 INFO - simpletestOnerror@SimpleTest/SimpleTest.js:1950:18
[task 2020-05-13T13:24:04.104Z] 13:24:04 INFO - OnErrorEventHandlerNonNull*@SimpleTest/SimpleTest.js:1925:1
[task 2020-05-13T13:24:04.104Z] 13:24:04 INFO - GECKO(4477) | JavaScript error: http://mochi.test:8888/tests/js/xpconnect/tests/mochi
Assignee | ||
Comment 6•5 years ago
|
||
Sorry about that, I didn't see that there are also mochi-tests which need to be updated to match the new API.
Comment 8•5 years ago
|
||
bugherder |
Description
•