diff --git a/dom/streams/TransformStreamDefaultController.cpp b/dom/streams/TransformStreamDefaultController.cpp index 055dd4d883e5..4076114d514c 100644 --- a/dom/streams/TransformStreamDefaultController.cpp +++ b/dom/streams/TransformStreamDefaultController.cpp @@ -101,7 +101,7 @@ void SetUpTransformStreamDefaultControllerFromTransformer( // Step 2. Let transformAlgorithm be the following steps, taking a chunk // argument: transformAlgorithm = [](JSContext* aCx, - TransformStreamDefaultController aController, + TransformStreamDefaultController& aController, JS::HandleValue aChunk, ErrorResult& aRv) -> already_AddRefed { MOZ_ASSERT(!aController.GetTransformCallback()); @@ -127,7 +127,7 @@ void SetUpTransformStreamDefaultControllerFromTransformer( controller->SetTransformerMembers(aTransformerDict.mTransform.Value(), aTransformer); transformAlgorithm = - [](JSContext* aCx, TransformStreamDefaultController aController, + [](JSContext* aCx, TransformStreamDefaultController& aController, JS::HandleValue aChunk, ErrorResult& aRv) MOZ_CAN_RUN_SCRIPT_FOR_DEFINITION -> already_AddRefed { MOZ_ASSERT(aController.GetTransformCallback()); diff --git a/dom/streams/TransformStreamDefaultController.h b/dom/streams/TransformStreamDefaultController.h index 82c956c5efc5..15f5cecf71d7 100644 --- a/dom/streams/TransformStreamDefaultController.h +++ b/dom/streams/TransformStreamDefaultController.h @@ -28,7 +28,7 @@ class TransformStreamDefaultController final : public nsISupports, public nsWrapperCache { public: using TransformAlgorithm = already_AddRefed (*)( - JSContext* aCx, TransformStreamDefaultController aController, + JSContext* aCx, TransformStreamDefaultController& aController, JS::HandleValue aChunk, ErrorResult& aRv); NS_DECL_CYCLE_COLLECTING_ISUPPORTS