mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-26 12:59:23 -10:00
Bug 1797724 - Part 3: Avoid unnecessary rooting in intrinsic_CreateAsyncFromSyncIterator. r=mgaudet
Part 8 will actually remove the entire method. Depends on D160476 Differential Revision: https://phabricator.services.mozilla.com/D160477
This commit is contained in:
1 parent
658220785c
commit
116423346d
1 file changed
+4
-5
@@ -849,13 +849,12 @@ bool js::intrinsic_CreateAsyncFromSyncIterator(JSContext* cx, unsigned argc,
|
||||
Value* vp) {
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
MOZ_ASSERT(args.length() == 2);
|
||||
MOZ_ASSERT(args.get(0).isObject());
|
||||
MOZ_ASSERT(args[0].isObject());
|
||||
|
||||
RootedObject iter(cx, &args.get(0).toObject());
|
||||
RootedValue nextMethod(cx, args.get(1));
|
||||
RootedObject iter(cx, &args[0].toObject());
|
||||
HandleValue nextMethod = args[1];
|
||||
|
||||
RootedObject syncIter(cx,
|
||||
js::CreateAsyncFromSyncIterator(cx, iter, nextMethod));
|
||||
JSObject* syncIter = js::CreateAsyncFromSyncIterator(cx, iter, nextMethod);
|
||||
if (!syncIter) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user