Fix stack overflow test failures with no snap.

R=mstarzinger@chromium.org
BUG=chromium:119429

Review URL: https://chromiumcodereview.appspot.com/9963108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
danno@chromium.org 2012-04-03 15:54:07 +00:00
parent 8dc9bc962f
commit d366275dd6
2 changed files with 9 additions and 0 deletions

View File

@ -1301,6 +1301,12 @@ bool Genesis::CompileNative(Vector<const char> name, Handle<String> source) {
#ifdef ENABLE_DEBUGGER_SUPPORT #ifdef ENABLE_DEBUGGER_SUPPORT
isolate->debugger()->set_compiling_natives(true); isolate->debugger()->set_compiling_natives(true);
#endif #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, bool result = CompileScriptCached(name,
source, source,
NULL, NULL,

View File

@ -820,6 +820,9 @@ bool Debug::Load() {
v8::Handle<ObjectTemplate>(), v8::Handle<ObjectTemplate>(),
NULL); NULL);
// Fail if no context could be created.
if (context.is_null()) return false;
// Use the debugger context. // Use the debugger context.
SaveContext save(isolate_); SaveContext save(isolate_);
isolate_->set_context(*context); isolate_->set_context(*context);