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

Unified Diff: src/execution.cc

Issue 238753003: Remove assertion from callers of TryCall. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix 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/debug.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/execution.cc
diff --git a/src/execution.cc b/src/execution.cc
index 2e6023b41e382933fb5ba6ced2dc0e6b8845ed1f..eb1fa4c1d9aba0af3ec93a4744dbd23848542179 100644
--- a/src/execution.cc
+++ b/src/execution.cc
@@ -740,13 +740,12 @@ Handle<Object> Execution::CharAt(Handle<String> string, uint32_t index) {
Handle<Object> index_object = factory->NewNumberFromInt(int_index);
Handle<Object> index_arg[] = { index_object };
Handle<Object> result;
- ASSIGN_RETURN_ON_EXCEPTION_VALUE(
- isolate, result,
- TryCall(Handle<JSFunction>::cast(char_at),
- string,
- ARRAY_SIZE(index_arg),
- index_arg),
- factory->undefined_value());
+ if (!TryCall(Handle<JSFunction>::cast(char_at),
+ string,
+ ARRAY_SIZE(index_arg),
+ index_arg).ToHandle(&result)) {
+ return factory->undefined_value();
+ }
return result;
}
« no previous file with comments | « src/debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698