Fix parent of the WeakMap prototype.
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
This commit is contained in:
parent
e74033d9cc
commit
aae949ba10
@ -85,9 +85,6 @@ function WeakMapDelete(key) {
|
||||
// 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);
|
||||
|
||||
|
@ -137,7 +137,11 @@ assertTrue(WeakMap.prototype.set instanceof Function)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user