| Index: src/v8natives.js
|
| diff --git a/src/v8natives.js b/src/v8natives.js
|
| index 10cd4affbba9b19e0d6a1e90d3c0ae360caaaa40..13a3e9ed379d3064831342a68a2383d21e6d2561 100644
|
| --- a/src/v8natives.js
|
| +++ b/src/v8natives.js
|
| @@ -1045,13 +1045,21 @@ function ProxyFix(obj) {
|
| if (IS_UNDEFINED(props)) {
|
| throw MakeTypeError("handler_returned_undefined", [handler, "fix"]);
|
| }
|
| -
|
| if (IS_FUNCTION(obj)) {
|
| var callTrap = %GetCallTrap(obj);
|
| var constructTrap = %GetConstructTrap(obj);
|
| var code = DelegateCallAndConstruct(callTrap, constructTrap);
|
| %Fix(obj); // becomes a regular function
|
| %SetCode(obj, code);
|
| + // TODO(rossberg): What about length and other properties? Not specified.
|
| + // We just put in some half-reasonable defaults for now.
|
| + var prototype = new $Object();
|
| + $Object.defineProperty(prototype, "constructor",
|
| + {value: obj, writable: true, enumerable: false, configrable: true});
|
| + $Object.defineProperty(obj, "prototype",
|
| + {value: prototype, writable: true, enumerable: false, configrable: false})
|
| + $Object.defineProperty(obj, "length",
|
| + {value: 0, writable: true, enumerable: false, configrable: false});
|
| } else {
|
| %Fix(obj);
|
| }
|
|
|