Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: src/api.cc

Issue 223593004: Revert "Return MaybeHandle from NewConsString." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 1e9e8625e8ee01af527240a93f1a3d153b81e12b..1386a3a0a2b7787dbcf2c71e6ca0d49ffbe6faac 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5459,9 +5459,10 @@ 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.
- i::Handle<i::String> result = isolate->factory()->NewConsString(
- left_string, right_string).ToHandleChecked();
+ CHECK(!result.is_null());
return Utils::ToLocal(result);
}
@@ -7032,15 +7033,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>(name);
+ return ToApiHandle<String>(
+ isolate->factory()->InternalizeUtf8String(entry->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()),
- name).ToHandleChecked();
+ isolate->factory()->InternalizeUtf8String(entry->name()));
+ // We do not expect this to fail. Change this if it does.
+ CHECK(!cons.is_null());
return ToApiHandle<String>(cons);
}
}
« no previous file with comments | « no previous file | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698