Skip to content
Snippets Groups Projects
Commit 8a4abc2a authored by André Bargull's avatar André Bargull
Browse files

Replace __proto__ with non-Annex B alternative

parent bb369e1e
No related branches found
No related tags found
No related merge requests found
...@@ -16,11 +16,12 @@ var sup = { ...@@ -16,11 +16,12 @@ var sup = {
} }
var child = { var child = {
__proto__: sup,
async method() { async method() {
var x = await super.method(); var x = await super.method();
assert.sameValue(x, 'sup'); assert.sameValue(x, 'sup');
} }
} }
Object.setPrototypeOf(child, sup);
child.method().then($DONE, $DONE); child.method().then($DONE, $DONE);
...@@ -16,12 +16,13 @@ var sup = { ...@@ -16,12 +16,13 @@ var sup = {
} }
var child = { var child = {
__proto__: sup,
async method(x = super.method()) { async method(x = super.method()) {
var y = await x; var y = await x;
assert.sameValue(y, 'sup'); assert.sameValue(y, 'sup');
} }
} }
Object.setPrototypeOf(child, sup);
child.method().then($DONE, $DONE); child.method().then($DONE, $DONE);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment