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

Unified Diff: src/json-stringifier.h

Issue 516913003: Do not expose termination exceptions to the Exception API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comment Created 6 years, 4 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-parser.h ('k') | src/jsregexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-stringifier.h
diff --git a/src/json-stringifier.h b/src/json-stringifier.h
index 1b108cece199c0b01c488837655318aef721c2e0..e6f5cfde105966e4dbc7df8ffd06df4abea00714 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -258,8 +258,7 @@ MaybeHandle<Object> BasicJsonStringifier::Stringify(Handle<Object> object) {
ShrinkCurrentPart();
Accumulate();
if (overflowed_) {
- return isolate_->Throw<Object>(
- isolate_->factory()->NewInvalidStringLengthError());
+ THROW_NEW_ERROR(isolate_, NewInvalidStringLengthError(), Object);
}
return accumulator();
}
@@ -372,8 +371,10 @@ BasicJsonStringifier::Result BasicJsonStringifier::StackPush(
for (int i = 0; i < length; i++) {
if (elements->get(i) == *object) {
AllowHeapAllocation allow_to_return_error;
- isolate_->Throw(*factory_->NewTypeError(
- "circular_structure", HandleVector<Object>(NULL, 0)));
+ Handle<Object> error;
+ MaybeHandle<Object> maybe_error = factory_->NewTypeError(
+ "circular_structure", HandleVector<Object>(NULL, 0));
+ if (maybe_error.ToHandle(&error)) isolate_->Throw(*error);
return EXCEPTION;
}
}
« no previous file with comments | « src/json-parser.h ('k') | src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698