Commit e1efb4be authored by littledan's avatar littledan Committed by Commit bot

Avoid using computed property literals in TypedArrays code

Computed property literals don't seem to work in nosnap yet,
leading to a syntax error.

R=adamk,arv

Review URL: https://codereview.chromium.org/1189643002

Cr-Commit-Position: refs/heads/master@{#29032}
parent 40420f67
......@@ -141,9 +141,11 @@ function NAMEConstructByIterable(obj, iterable, iteratorFn) {
// of modifications to Object.prototype being observable here.
var iterator = %_CallFunction(iterable, iteratorFn);
var newIterable = {
__proto__: null,
[symbolIterator]() { return iterator; }
__proto__: null
};
// TODO(littledan): Computed properties don't work yet in nosnap.
// Rephrase when they do.
newIterable[symbolIterator] = function() { return iterator; }
for (var value of newIterable) {
list.push(value);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment