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

Unified Diff: src/string-stream.cc

Issue 239243018: Heap::AllocateStringFromOneByte() and major part of its callers handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comment + some cleanup Created 6 years, 8 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 | « src/scanner.cc ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string-stream.cc
diff --git a/src/string-stream.cc b/src/string-stream.cc
index 93eb2229e58db1b817ab187537fe3608c979d86d..e9795adde3653dacd29aad04ea115c4f91293418 100644
--- a/src/string-stream.cc
+++ b/src/string-stream.cc
@@ -265,8 +265,14 @@ void StringStream::OutputToFile(FILE* out) {
Handle<String> StringStream::ToString(Isolate* isolate) {
- return isolate->factory()->NewStringFromUtf8(
+ MaybeHandle<String> maybe_result = isolate->factory()->NewStringFromUtf8(
Vector<const char>(buffer_, length_));
+
+ // TODO(ishell): Temporarily returning null handle from here. I will proceed
+ // with maybehandlification in next CLs.
+ Handle<String> result;
+ if (!maybe_result.ToHandle(&result)) return Handle<String>();
+ return result;
}
« no previous file with comments | « src/scanner.cc ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698