Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 05dd5c96619ea25d61feb38d8f54a9834b61f7e7..638e6aca9e91b06ff226cb9b7b5974529945743f 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -900,10 +900,19 @@ Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler, |
} |
-void Factory::BecomeJSObject(Handle<JSProxy> object) { |
+void Factory::BecomeJSObject(Handle<JSReceiver> object) { |
CALL_HEAP_FUNCTION_VOID( |
isolate(), |
- isolate()->heap()->ReinitializeJSProxyAsJSObject(*object)); |
+ isolate()->heap()->ReinitializeJSReceiver( |
+ *object, JS_OBJECT_TYPE, JSObject::kHeaderSize)); |
+} |
+ |
+ |
+void Factory::BecomeJSFunction(Handle<JSReceiver> object) { |
+ CALL_HEAP_FUNCTION_VOID( |
+ isolate(), |
+ isolate()->heap()->ReinitializeJSReceiver( |
+ *object, JS_FUNCTION_TYPE, JSFunction::kSize)); |
} |