Commit 1b3b9220 authored by ishell@chromium.org's avatar ishell@chromium.org

Handlification TODOs in scanner and string stream resolved.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/251263004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8b489532
......@@ -1095,19 +1095,13 @@ bool Scanner::ScanRegExpFlags() {
Handle<String> Scanner::AllocateNextLiteralString(Isolate* isolate,
PretenureFlag tenured) {
MaybeHandle<String> maybe_result;
if (is_next_literal_one_byte()) {
maybe_result = isolate->factory()->NewStringFromOneByte(
next_literal_one_byte_string(), tenured);
return isolate->factory()->NewStringFromOneByte(
next_literal_one_byte_string(), tenured).ToHandleChecked();
} else {
maybe_result = isolate->factory()->NewStringFromTwoByte(
next_literal_two_byte_string(), tenured);
return isolate->factory()->NewStringFromTwoByte(
next_literal_two_byte_string(), tenured).ToHandleChecked();
}
// 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;
}
......
......@@ -265,14 +265,8 @@ void StringStream::OutputToFile(FILE* out) {
Handle<String> StringStream::ToString(Isolate* isolate) {
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;
return isolate->factory()->NewStringFromUtf8(
Vector<const char>(buffer_, length_)).ToHandleChecked();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment