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

Unified Diff: src/parser.cc

Issue 223813002: Reland "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 | « src/json-stringifier.h ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 5fce1dd94a677df4ade93876e6ac78496c08d1c1..d0e01fc371521e28b744cae920a07387912aa3f0 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -2974,9 +2974,11 @@ Statement* Parser::ParseForStatement(ZoneStringList* labels, bool* ok) {
// TODO(keuchel): Move the temporary variable to the block scope, after
// implementing stack allocated block scoped variables.
Factory* heap_factory = isolate()->factory();
- Handle<String> tempstr =
- heap_factory->NewConsString(heap_factory->dot_for_string(), name);
- RETURN_IF_EMPTY_HANDLE_VALUE(isolate(), tempstr, 0);
+ Handle<String> tempstr;
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(
+ isolate(), tempstr,
+ heap_factory->NewConsString(heap_factory->dot_for_string(), name),
+ 0);
Handle<String> tempname = heap_factory->InternalizeString(tempstr);
Variable* temp = scope_->DeclarationScope()->NewTemporary(tempname);
VariableProxy* temp_proxy = factory()->NewVariableProxy(temp);
« no previous file with comments | « src/json-stringifier.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698