Bug 1128959 - Implement the WHATWG Streams spec - part 17 - Creating FetchStream as a out param in order to avoid JS hazards, r=bz

This commit is contained in:
Andrea Marchesini
2017-08-10 18:04:56 -07:00
parent 693036056d
commit e3427f1588
3 changed files with 22 additions and 17 deletions

View File

@@ -1116,12 +1116,9 @@ FetchBody<Derived>::GetBody(JSContext* aCx,
return;
}
JS::Rooted<JSObject*> body(aCx,
FetchStream::Create(aCx,
this,
DerivedClass()->GetParentObject(),
inputStream,
aRv));
JS::Rooted<JSObject*> body(aCx);
FetchStream::Create(aCx, this, DerivedClass()->GetParentObject(),
inputStream, &body, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return;
}