Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 40e06c24ce43d5bffff4aa56429cdd5fc5e95ce6..40651f373432508f539f095cd6d7d8897b24cb83 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1679,6 +1679,20 @@ void JSObject::PrintElementsTransition( |
} |
+// static |
+MaybeHandle<JSFunction> Map::GetConstructorFunction( |
+ Handle<Map> map, Handle<Context> native_context) { |
+ if (map->IsPrimitiveMap()) { |
+ int const constructor_function_index = map->GetConstructorFunctionIndex(); |
+ if (constructor_function_index != kNoConstructorFunctionIndex) { |
+ return handle( |
+ JSFunction::cast(native_context->get(constructor_function_index))); |
+ } |
+ } |
+ return MaybeHandle<JSFunction>(); |
+} |
+ |
+ |
void Map::PrintReconfiguration(FILE* file, int modify_index, PropertyKind kind, |
PropertyAttributes attributes) { |
OFStream os(file); |