Revision: 9254
Author:   [email protected]
Date:     Tue Sep 13 02:45:10 2011
Log:      Fix parent of the WeakMap prototype.

[email protected]
BUG=v8:1565
TEST=mjsunit/harmony/weakmaps

Review URL: http://codereview.chromium.org/7890003
http://code.google.com/p/v8/source/detail?r=9254

Modified:
 /branches/bleeding_edge/src/weakmap.js
 /branches/bleeding_edge/test/mjsunit/harmony/weakmaps.js

=======================================
--- /branches/bleeding_edge/src/weakmap.js      Mon Sep  5 00:30:35 2011
+++ /branches/bleeding_edge/src/weakmap.js      Tue Sep 13 02:45:10 2011
@@ -85,9 +85,6 @@
   // 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);

=======================================
--- /branches/bleeding_edge/test/mjsunit/harmony/weakmaps.js Tue Aug 30 02:35:20 2011 +++ /branches/bleeding_edge/test/mjsunit/harmony/weakmaps.js Tue Sep 13 02:45:10 2011
@@ -137,7 +137,11 @@
 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

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to