code: function resolve(x) {
                          // instanceof instead of internal slot check because we should fix it without replacement native Promise core
                          if (x instanceof $Promise && sameConstructor(x.constructor, this)) return x;
                          var capability = newPromiseCapability(this)
                              , $$resolve = capability.resolve;
                          $$resolve(x);
                          return capability.promise;
                      }
docs: 25.4.4.6 Promise.resolve(x)