Bug 1637566 - FinalizationRegistrationsObject's Records slot should be created as a WeakFinalizationRecordVector r=anba
authorJon Coppeard <jcoppeard@mozilla.com>
Thu, 14 May 2020 11:19:01 +0000
changeset 529852 9685e26fe77d10bbb01174b755c4698b9be161f8
parent 529851 9f648f9650c8a4fd3cbf6bfb6f1f4bdcfa7db78e
child 529853 4dd20d7e4ed3864c31e5182d458b4d66012ca228
push id37416
push usercsabou@mozilla.com
push dateThu, 14 May 2020 16:15:31 +0000
treeherdermozilla-central@80ba3f3cfaf9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersanba
bugs1637566
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1637566 - FinalizationRegistrationsObject's Records slot should be created as a WeakFinalizationRecordVector r=anba Depends on D75272 Differential Revision: https://phabricator.services.mozilla.com/D75273
js/src/builtin/FinalizationRegistryObject.cpp
--- a/js/src/builtin/FinalizationRegistryObject.cpp
+++ b/js/src/builtin/FinalizationRegistryObject.cpp
@@ -153,17 +153,17 @@ const JSClassOps FinalizationRegistratio
     nullptr,                                    // hasInstance
     nullptr,                                    // construct
     nullptr,                                    // trace
 };
 
 /* static */
 FinalizationRegistrationsObject* FinalizationRegistrationsObject::create(
     JSContext* cx) {
-  auto records = cx->make_unique<FinalizationRecordVector>(cx->zone());
+  auto records = cx->make_unique<WeakFinalizationRecordVector>(cx->zone());
   if (!records) {
     return nullptr;
   }
 
   auto object =
       NewObjectWithGivenProto<FinalizationRegistrationsObject>(cx, nullptr);
   if (!object) {
     return nullptr;