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}
This commit is contained in:
littledan 2015-06-15 14:11:05 -07:00 committed by Commit bot
parent 40420f67e7
commit e1efb4be11

View File

@ -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);
}