R=rossberg@chromium.org
BUG=v8:1565
TEST=mjsunit/harmony/weakmaps
Review URL: http://codereview.chromium.org/7890003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9254
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
// Set up the WeakMap constructor function.
%SetCode($WeakMap, WeakMapConstructor);
- // Set up the WeakMap prototype object.
- %FunctionSetPrototype($WeakMap, new $WeakMap());
-
// Set up the constructor property on the WeakMap prototype object.
%SetProperty($WeakMap.prototype, "constructor", $WeakMap, DONT_ENUM);
assertTrue(WeakMap.prototype.get instanceof Function)
assertTrue(WeakMap.prototype.has instanceof Function)
assertTrue(WeakMap.prototype.delete instanceof Function)
+
+
+// Regression test for WeakMap prototype.
assertTrue(WeakMap.prototype.constructor === WeakMap)
+assertTrue(Object.getPrototypeOf(WeakMap.prototype) === Object.prototype)
// Regression test for issue 1617: The prototype of the WeakMap constructor