Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index c1322d7e774fedbefc1a19fbf4618f492babe213..c3a3b1570ffac982490b184681f153691e8e021b 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1930,6 +1930,7 @@ Handle<JSProxy> Factory::NewJSFunctionProxy(Handle<Object> handler, |
Handle<Map> map = NewMap(JS_FUNCTION_PROXY_TYPE, JSFunctionProxy::kSize); |
Map::SetPrototype(map, prototype); |
map->set_is_callable(); |
+ map->set_is_constructor(construct_trap->IsCallable()); |
// Allocate the proxy object. |
Handle<JSFunctionProxy> result = New<JSFunctionProxy>(map, NEW_SPACE); |
@@ -1991,7 +1992,7 @@ void Factory::ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, |
// Functions require some minimal initialization. |
if (type == JS_FUNCTION_TYPE) { |
- map->set_function_with_prototype(true); |
+ map->set_is_constructor(true); |
map->set_is_callable(); |
Handle<JSFunction> js_function = Handle<JSFunction>::cast(proxy); |
InitializeFunction(js_function, shared.ToHandleChecked(), context); |