Fixed a couple of failing DCHECK(has_pending_exception()).

BUG=chromium:491062
LOG=N

Review URL: https://codereview.chromium.org/1151373002

Cr-Commit-Position: refs/heads/master@{#28617}
This commit is contained in:
ishell 2015-05-26 03:06:47 -07:00 committed by Commit bot
parent 7b24219346
commit 62b56507cc
4 changed files with 27 additions and 7 deletions

View File

@ -608,13 +608,7 @@ bool Debug::CompileDebuggerScript(Isolate* isolate, int index) {
source_code, script_name, 0, 0, ScriptOriginOptions(), Handle<Object>(),
context, NULL, NULL, ScriptCompiler::kNoCompileOptions, NATIVES_CODE,
false);
// Silently ignore stack overflows during compilation.
if (function_info.is_null()) {
DCHECK(isolate->has_pending_exception());
isolate->clear_pending_exception();
return false;
}
if (function_info.is_null()) return false;
// Execute the shared function in the debugger context.
Handle<JSFunction> function =

View File

@ -2747,6 +2747,7 @@ RUNTIME_FUNCTION(Runtime_DebugGetLoadedScripts) {
Handle<FixedArray> instances;
{
DebugScope debug_scope(isolate->debug());
if (debug_scope.failed()) return isolate->heap()->exception();
// Fill the script objects.
instances = isolate->debug()->GetLoadedScripts();
}

View File

@ -177,6 +177,9 @@
# Issue 488: this test sometimes times out.
'array-constructor': [PASS, TIMEOUT],
# Run only on fast architectures, contains no architecture dependent code.
'regress/regress-crbug-491062': [PASS, ['arch != ia32 and arch != x64', SKIP], NO_VARIANTS],
# Very slow on ARM and MIPS, contains no architecture dependent code.
'unicode-case-overoptimization': [PASS, NO_VARIANTS, ['arch == arm or arch == android_arm or arch == android_arm64 or arch == mipsel or arch == mips64el or arch == mips', TIMEOUT]],
'regress/regress-3976': [PASS, NO_VARIANTS, ['arch == arm or arch == android_arm or arch == android_arm64 or arch == mipsel or arch == mips64el or arch == mips', SKIP]],

View File

@ -0,0 +1,22 @@
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --stack-limit=32
function g() {}
var count = 0;
function f() {
try {
f();
} catch(e) {
print(e.stack);
}
if (count < 50) {
count++;
%DebugGetLoadedScripts();
}
}
f();
g();