{Map, Set, WeakMap, WeakSet}.length should be 0.
BUG=v8:4021
LOG=N
R=adamk@chromium.org
Review URL: https://codereview.chromium.org/
1073233002
Cr-Commit-Position: refs/heads/master@{#27798}
%SetCode($Set, SetConstructor);
+%FunctionSetLength($Set, 0);
%FunctionSetPrototype($Set, new $Object());
%AddNamedProperty($Set.prototype, "constructor", $Set, DONT_ENUM);
%AddNamedProperty(
%SetCode($Map, MapConstructor);
+%FunctionSetLength($Map, 0);
%FunctionSetPrototype($Map, new $Object());
%AddNamedProperty($Map.prototype, "constructor", $Map, DONT_ENUM);
%AddNamedProperty(
%CheckIsBootstrapping();
%SetCode($WeakMap, WeakMapConstructor);
+ %FunctionSetLength($WeakMap, 0);
%FunctionSetPrototype($WeakMap, new $Object());
%AddNamedProperty($WeakMap.prototype, "constructor", $WeakMap, DONT_ENUM);
%AddNamedProperty(
%CheckIsBootstrapping();
%SetCode($WeakSet, WeakSetConstructor);
+ %FunctionSetLength($WeakSet, 0);
%FunctionSetPrototype($WeakSet, new $Object());
%AddNamedProperty($WeakSet.prototype, "constructor", $WeakSet, DONT_ENUM);
%AddNamedProperty(
assertFalse(C === Object.prototype.constructor);
assertSame(C, C.prototype.constructor);
assertSame(C, (new C).__proto__.constructor);
- assertEquals(1, C.length);
+ assertEquals(0, C.length);
}
TestConstructor(Set);
TestConstructor(Map);