Bug 1504464 - Part 10: Rename a local variable to follow the `unwrapped` convention. r=jwalden
authorJason Orendorff <jorendorff@mozilla.com>
Mon, 14 Jan 2019 20:35:37 +0000
changeset 510924 956a058f383c93234f7bb01656afbb67a077386a
parent 510923 b07b0b1afe6600cd07a46f66ba25b73320c72a68
child 510925 60668e84331f40ff3185d658a33d91ae89fa2dad
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1504464
milestone66.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 1504464 - Part 10: Rename a local variable to follow the `unwrapped` convention. r=jwalden Differential Revision: https://phabricator.services.mozilla.com/D14508
js/src/builtin/Stream.cpp
--- a/js/src/builtin/Stream.cpp
+++ b/js/src/builtin/Stream.cpp
@@ -2691,33 +2691,34 @@ static JSObject* ReadableStreamDefaultCo
 
 /**
  * Streams spec, 3.9.2 and 3.12.3. step 7:
  *      Upon fulfillment of pullPromise, [...]
  */
 static bool ControllerPullHandler(JSContext* cx, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
 
-  Rooted<ReadableStreamController*> controller(
+  Rooted<ReadableStreamController*> unwrappedController(
       cx, UnwrapCalleeSlot<ReadableStreamController>(cx, args, 0));
-  if (!controller) {
+  if (!unwrappedController) {
     return false;
   }
 
-  bool pullAgain = controller->pullAgain();
+  bool pullAgain = unwrappedController->pullAgain();
 
   // Step a: Set controller.[[pulling]] to false.
   // Step b.i: Set controller.[[pullAgain]] to false.
-  controller->clearPullFlags();
+  unwrappedController->clearPullFlags();
 
   // Step b: If controller.[[pullAgain]] is true,
   if (pullAgain) {
     // Step ii: Perform
-    //          ! ReadableByteStreamControllerCallPullIfNeeded(controller).
-    if (!ReadableStreamControllerCallPullIfNeeded(cx, controller)) {
+    //          ! ReadableStreamDefaultControllerCallPullIfNeeded(controller)
+    //          (or ReadableByteStreamControllerCallPullIfNeeded(controller)).
+    if (!ReadableStreamControllerCallPullIfNeeded(cx, unwrappedController)) {
       return false;
     }
   }
 
   args.rval().setUndefined();
   return true;
 }