1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/.yarn/patches/regenerator-runtime-npm-0.13.7-41bcbe64ea.patch
Brad Decker 6d1170f06c
upgrade yarn to version 3 (#16232)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: ricky <ricky.miller@gmail.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
2022-12-08 10:38:04 -06:00

68 lines
2.5 KiB
Diff

diff --git a/runtime.js b/runtime.js
index 547b8c6af462faae1a859160a54fd1d107dd52c3..57030742671c525d1717a1fb11eea0c7ffd59689 100644
--- a/runtime.js
+++ b/runtime.js
@@ -86,9 +86,9 @@ var runtime = (function (exports) {
// This is a polyfill for %IteratorPrototype% for environments that
// don't natively support it.
var IteratorPrototype = {};
- IteratorPrototype[iteratorSymbol] = function () {
+ define(IteratorPrototype, iteratorSymbol, function () {
return this;
- };
+ });
var getProto = Object.getPrototypeOf;
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
@@ -102,8 +102,9 @@ var runtime = (function (exports) {
var Gp = GeneratorFunctionPrototype.prototype =
Generator.prototype = Object.create(IteratorPrototype);
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
+ define(Gp, "constructor", GeneratorFunctionPrototype);
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
GeneratorFunction.displayName = define(
GeneratorFunctionPrototype,
toStringTagSymbol,
@@ -217,9 +218,9 @@ var runtime = (function (exports) {
}
defineIteratorMethods(AsyncIterator.prototype);
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
return this;
- };
+ });
exports.AsyncIterator = AsyncIterator;
// Note that simple async functions are implemented on top of
@@ -412,13 +413,13 @@ var runtime = (function (exports) {
// iterator prototype chain incorrectly implement this, causing the Generator
// object to not be returned from this call. This ensures that doesn't happen.
// See https://github.com/facebook/regenerator/issues/274 for more details.
- Gp[iteratorSymbol] = function() {
+ define(Gp, iteratorSymbol, function() {
return this;
- };
+ });
- Gp.toString = function() {
+ define(Gp, 'toString', function() {
return "[object Generator]";
- };
+ });
function pushTryEntry(locs) {
var entry = { tryLoc: locs[0] };
@@ -733,7 +734,7 @@ var runtime = (function (exports) {
));
try {
- regeneratorRuntime = runtime;
+ globalThis.regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
// This module should not be running in strict mode, so the above
// assignment should always work unless something is misconfigured. Just