code: function enqueue(method, arg) {                                                                        // 180
        function callInvokeWithMethodAndArg() {                                                              // 181
          return new Promise(function(resolve, reject) {                                                     // 182
            invoke(method, arg, resolve, reject);                                                            // 183
          });                                                                                                // 184
        }                                                                                                    // 185
                                                                                                             // 186
        return previousPromise =                                                                             // 187
          // If enqueue has been called before, then we want to wait until                                   // 188
          // all previous Promises have been resolved before calling invoke,                                 // 189
          // so that results are always delivered in the correct order. If                                   // 190
          // enqueue has not been called before, then it is important to                                     // 191
          // call invoke immediately, without waiting on a callback to fire,                                 // 192
          // so that the async generator function has the opportunity to do                                  // 193
          // any necessary setup in a predictable way. This predictability                                   // 194
          // is why the Promise constructor synchronously invokes its                                        // 195
          // executor callback, and why async functions synchronously                                        // 196
          // execute code before the first await. Since we implement simple                                  // 197
          // async functions in terms of async generators, it is especially                                  // 198
          // important to get this right, even though it requires care.                                      // 199
          previousPromise ? previousPromise.then(                                                            // 200
            callInvokeWithMethodAndArg,                                                                      // 201
            // Avoid propagating failures to Promises returned by later                                      // 202
            // invocations of the iterator.                                                                  // 203
            callInvokeWithMethodAndArg                                                                       // 204
          ) : callInvokeWithMethodAndArg();                                                                  // 205
      }
docs: 178 179