diff --git a/src/objects.cc b/src/objects.cc index 221dc6ae37..7491e3193b 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -1337,7 +1337,9 @@ Handle FunctionTemplateInfo::GetOrCreateSharedFunctionInfo( } result->set_length(info->length()); - if (class_name->IsString()) result->set_instance_class_name(*class_name); + if (class_name->IsString()) { + result->set_instance_class_name(String::cast(*class_name)); + } result->set_api_func_data(*info); result->DontAdaptArguments(); DCHECK(result->IsApiFunction()); diff --git a/src/objects/shared-function-info-inl.h b/src/objects/shared-function-info-inl.h index 0f80917a35..aa6bf319e9 100644 --- a/src/objects/shared-function-info-inl.h +++ b/src/objects/shared-function-info-inl.h @@ -27,7 +27,7 @@ ACCESSORS(SharedFunctionInfo, raw_name, Object, kNameOffset) ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) ACCESSORS(SharedFunctionInfo, feedback_metadata, FeedbackMetadata, kFeedbackMetadataOffset) -ACCESSORS(SharedFunctionInfo, instance_class_name, Object, +ACCESSORS(SharedFunctionInfo, instance_class_name, String, kInstanceClassNameOffset) ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) diff --git a/src/objects/shared-function-info.h b/src/objects/shared-function-info.h index 82423c3ac6..669a47d457 100644 --- a/src/objects/shared-function-info.h +++ b/src/objects/shared-function-info.h @@ -137,7 +137,7 @@ class SharedFunctionInfo : public HeapObject { #endif // [instance class name]: class name for instances. - DECL_ACCESSORS(instance_class_name, Object) + DECL_ACCESSORS(instance_class_name, String) // [function data]: This field holds some additional data for function. // Currently it has one of: