| Index: test/mjsunit/function-bind.js
|
| diff --git a/test/mjsunit/function-bind.js b/test/mjsunit/function-bind.js
|
| index 23dacf157e6ea85064d4b69a1718c1ddcea1470e..a2efe4f034e163ffbc14cdfc5172f597ee29f94e 100644
|
| --- a/test/mjsunit/function-bind.js
|
| +++ b/test/mjsunit/function-bind.js
|
| @@ -298,3 +298,17 @@ assertThrows(function() { f.arguments = 42; }, TypeError);
|
| // the caller is strict and the callee isn't. A bound function is built-in,
|
| // but not considered strict.
|
| (function foo() { return foo.caller; }).bind()();
|
| +
|
| +
|
| +(function TestProtoIsPreserved() {
|
| + function fun() {}
|
| +
|
| + function proto() {}
|
| + Object.setPrototypeOf(fun, proto);
|
| + var bound = fun.bind({});
|
| + assertEquals(proto, Object.getPrototypeOf(bound));
|
| +
|
| + Object.setPrototypeOf(fun, null);
|
| + bound = Function.prototype.bind.call(fun, {});
|
| + assertEquals(null, Object.getPrototypeOf(bound));
|
| +})();
|
|
|