Commit eeb2d17b authored by verwaest's avatar verwaest Committed by Commit bot

Fix ToNameArray

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28580}
parent 65bea197
......@@ -955,7 +955,7 @@ function ToNameArray(obj, trap, includeSymbols) {
if (%HasOwnProperty(names, s)) {
throw MakeTypeError(kProxyRepeatedPropName, trap, s);
}
array[index] = s;
array[realLength] = s;
++realLength;
names[s] = 0;
}
......
......@@ -175,3 +175,9 @@ TestForInThrow(Proxy.create({
for (var k in o) { keys.push(k); };
assertEquals(["0"], keys);
})();
(function () {
var p = Proxy.create({getOwnPropertyNames:
function() { return [1, Symbol(), 2] }});
assertEquals(["1","2"], Object.getOwnPropertyNames(p));
})();
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