Revision: 11220
Author:   [email protected]
Date:     Tue Apr  3 08:54:07 2012
Log:      Fix stack overflow test failures with no snap.

[email protected]
BUG=chromium:119429

Review URL: https://chromiumcodereview.appspot.com/9963108
http://code.google.com/p/v8/source/detail?r=11220

Modified:
 /branches/bleeding_edge/src/bootstrapper.cc
 /branches/bleeding_edge/src/debug.cc

=======================================
--- /branches/bleeding_edge/src/bootstrapper.cc Fri Mar  9 03:11:55 2012
+++ /branches/bleeding_edge/src/bootstrapper.cc Tue Apr  3 08:54:07 2012
@@ -1301,6 +1301,12 @@
 #ifdef ENABLE_DEBUGGER_SUPPORT
   isolate->debugger()->set_compiling_natives(true);
 #endif
+ // During genesis, the boilerplate for stack overflow won't work until the
+  // environment has been at least partially initialized. Add a stack check
+  // before entering JS code to catch overflow early.
+  StackLimitCheck check(Isolate::Current());
+  if (check.HasOverflowed()) return false;
+
   bool result = CompileScriptCached(name,
                                     source,
                                     NULL,
=======================================
--- /branches/bleeding_edge/src/debug.cc        Tue Apr  3 06:45:56 2012
+++ /branches/bleeding_edge/src/debug.cc        Tue Apr  3 08:54:07 2012
@@ -820,6 +820,9 @@
           v8::Handle<ObjectTemplate>(),
           NULL);

+  // Fail if no context could be created.
+  if (context.is_null()) return false;
+
   // Use the debugger context.
   SaveContext save(isolate_);
   isolate_->set_context(*context);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to