Replace __proto__ with non-Annex B alternative

This commit is contained in:
André Bargull 2017-02-10 16:58:02 +01:00
parent bb369e1e7c
commit 8a4abc2a00
2 changed files with 4 additions and 2 deletions

View File

@ -16,11 +16,12 @@ var sup = {
}
var child = {
__proto__: sup,
async method() {
var x = await super.method();
assert.sameValue(x, 'sup');
}
}
Object.setPrototypeOf(child, sup);
child.method().then($DONE, $DONE);

View File

@ -16,12 +16,13 @@ var sup = {
}
var child = {
__proto__: sup,
async method(x = super.method()) {
var y = await x;
assert.sameValue(y, 'sup');
}
}
Object.setPrototypeOf(child, sup);
child.method().then($DONE, $DONE);