Bug 1600019 - Part 3: Use NewObjectWithGivenProto when |prototype| argument is guaranteed to be non-null. r=jonco

`NewObjectWithClassProto` when called with a non-null prototype calls `NewObjectWithGivenTaggedProto`,
but that function can be called more directly through `NewObjectWithGivenProto`.

Depends on D55087

Differential Revision: https://phabricator.services.mozilla.com/D55088

--HG--
extra : moz-landing-system : lando
This commit is contained in:
André Bargull 2019-11-28 16:56:37 +00:00
Родитель dd22a47211
Коммит 4a83568d4d
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -665,7 +665,7 @@ bool GlobalObject::initFinalizationIteratorProto(JSContext* cx,
}
FinalizationIteratorObject* iterator =
NewObjectWithClassProto<FinalizationIteratorObject>(cx, proto);
NewObjectWithGivenProto<FinalizationIteratorObject>(cx, proto);
if (!iterator) {
return nullptr;
}