Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 1386a3a0a2b7787dbcf2c71e6ca0d49ffbe6faac..1e9e8625e8ee01af527240a93f1a3d153b81e12b 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -5459,10 +5459,9 @@ Local<String> v8::String::Concat(Handle<String> left, Handle<String> right) { |
LOG_API(isolate, "String::New(char)"); |
ENTER_V8(isolate); |
i::Handle<i::String> right_string = Utils::OpenHandle(*right); |
- i::Handle<i::String> result = isolate->factory()->NewConsString(left_string, |
- right_string); |
// We do not expect this to fail. Change this if it does. |
- CHECK(!result.is_null()); |
+ i::Handle<i::String> result = isolate->factory()->NewConsString( |
+ left_string, right_string).ToHandleChecked(); |
return Utils::ToLocal(result); |
} |
@@ -7033,15 +7032,15 @@ Handle<String> CpuProfileNode::GetFunctionName() const { |
i::Isolate* isolate = i::Isolate::Current(); |
const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); |
const i::CodeEntry* entry = node->entry(); |
+ i::Handle<i::String> name = |
+ isolate->factory()->InternalizeUtf8String(entry->name()); |
if (!entry->has_name_prefix()) { |
- return ToApiHandle<String>( |
- isolate->factory()->InternalizeUtf8String(entry->name())); |
+ return ToApiHandle<String>(name); |
} else { |
+ // We do not expect this to fail. Change this if it does. |
i::Handle<i::String> cons = isolate->factory()->NewConsString( |
isolate->factory()->InternalizeUtf8String(entry->name_prefix()), |
- isolate->factory()->InternalizeUtf8String(entry->name())); |
- // We do not expect this to fail. Change this if it does. |
- CHECK(!cons.is_null()); |
+ name).ToHandleChecked(); |
return ToApiHandle<String>(cons); |
} |
} |