@@ -201,3 +201,20 @@ issue_4811_2: {
|
|||||||
expect_stdout: "PASS [object global] true"
|
expect_stdout: "PASS [object global] true"
|
||||||
node_version: ">=8"
|
node_version: ">=8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5197: {
|
||||||
|
rename = true
|
||||||
|
input: {
|
||||||
|
function f(async) {
|
||||||
|
async(")=>{}");
|
||||||
|
}
|
||||||
|
console.log("" + this.__proto__);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
function f(a) {
|
||||||
|
a(")=>{}");
|
||||||
|
}
|
||||||
|
console.log("" + this.__proto__);
|
||||||
|
}
|
||||||
|
expect_stdout: "[object global]"
|
||||||
|
}
|
||||||
|
|||||||
@@ -202,13 +202,11 @@ function setup(global, builtins, setup_log, setup_tty) {
|
|||||||
});
|
});
|
||||||
Object.defineProperties(global, props);
|
Object.defineProperties(global, props);
|
||||||
// for Node.js v8+
|
// for Node.js v8+
|
||||||
if (global.toString !== Object.prototype.toString) {
|
global.__proto__ = Object.defineProperty(Object.create(global.__proto__), "toString", {
|
||||||
global.__proto__ = Object.defineProperty(Object.create(global.__proto__), "toString", {
|
value: function() {
|
||||||
value: function() {
|
return "[object global]";
|
||||||
return "[object global]";
|
},
|
||||||
},
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function self() {
|
function self() {
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
Reference in New Issue
Block a user