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

Unified Diff: src/runtime/runtime-strings.cc

Issue 1151333005: A couple of other "stack overflow" vs. "has_pending_exception()" issues fixed. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing and try failures fixes Created 5 years, 6 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/isolate.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-strings.cc
diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc
index 5704807b82b60a62e0887efce7423d7e4e124ec6..49ce1a72575d28e420dabe5ba321f926e30e2793 100644
--- a/src/runtime/runtime-strings.cc
+++ b/src/runtime/runtime-strings.cc
@@ -121,11 +121,13 @@ RUNTIME_FUNCTION(Runtime_StringReplaceOneCharWithString) {
if (isolate->has_pending_exception()) return isolate->heap()->exception();
subject = String::Flatten(subject);
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result,
- StringReplaceOneCharWithString(isolate, subject, search, replace, &found,
- kRecursionLimit));
- return *result;
+ if (StringReplaceOneCharWithString(isolate, subject, search, replace, &found,
+ kRecursionLimit).ToHandle(&result)) {
+ return *result;
+ }
+ if (isolate->has_pending_exception()) return isolate->heap()->exception();
+ // In case of empty handle and no pending exception we have stack overflow.
+ return isolate->StackOverflow();
}
« no previous file with comments | « src/isolate.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698