Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index d0c9d26a04ad74d2ddd12b8b04a6c775985a95d2..ddcc682e2f33f75adf3263f7894bd7d226181a70 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -5475,6 +5475,8 @@ Local<String> v8::String::Concat(Handle<String> left, Handle<String> right) { |
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 throw an exception. Change this if it does. |
+ CHECK_NOT_EMPTY_HANDLE(isolate, result); |
return Utils::ToLocal(result); |
} |
@@ -6966,9 +6968,12 @@ Handle<String> CpuProfileNode::GetFunctionName() const { |
return ToApiHandle<String>( |
isolate->factory()->InternalizeUtf8String(entry->name())); |
} else { |
- return ToApiHandle<String>(isolate->factory()->NewConsString( |
+ i::Handle<i::String> cons = isolate->factory()->NewConsString( |
isolate->factory()->InternalizeUtf8String(entry->name_prefix()), |
- isolate->factory()->InternalizeUtf8String(entry->name()))); |
+ isolate->factory()->InternalizeUtf8String(entry->name())); |
+ // We do not expect this to throw an exception. Change this if it does. |
+ CHECK_NOT_EMPTY_HANDLE(isolate, cons); |
+ return ToApiHandle<String>(cons); |
} |
} |