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

Unified Diff: src/objects.cc

Issue 2206313002: Handle stack overflows in NoSideEffectToString (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | test/mjsunit/regress/regress-633998.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 94b57afb85ac00d7ccbd90dc8b82eea9fbbdf311..daca35918c00692cb5ef99bf745ea7979a601a45 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -260,6 +260,11 @@ Handle<String> NoSideEffectsErrorToString(Isolate* isolate,
// static
Handle<String> Object::NoSideEffectsToString(Isolate* isolate,
Handle<Object> input) {
+ StackLimitCheck stack_check(isolate);
+ if (stack_check.HasOverflowed()) {
+ return isolate->factory()->NewStringFromAsciiChecked("<stack overflow>");
+ }
+
DisallowJavascriptExecution no_js(isolate);
if (input->IsString() || input->IsNumber() || input->IsOddball() ||
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-633998.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698