[turbofan] Clear pending exception from unsuccessful compilation.

BUG=chromium:458987
LOG=n
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26665}
This commit is contained in:
jarin 2015-02-16 06:25:10 -08:00 committed by Commit bot
parent 0914181d97
commit d0758949e1
2 changed files with 19 additions and 0 deletions

View File

@ -867,6 +867,9 @@ MaybeHandle<Code> Compiler::GetLazyCode(Handle<JSFunction> function) {
DCHECK(function->shared()->is_compiled());
return info.code();
}
// We have failed compilation. If there was an exception clear it so that
// we can compile unoptimized code.
if (isolate->has_pending_exception()) isolate->clear_pending_exception();
}
if (function->shared()->is_compiled()) {

View File

@ -0,0 +1,16 @@
// Copyright 2014 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.
(function () {
"use asm";
function g() {}
runNearStackLimit(g);
})();
function runNearStackLimit(f) {
function g() { try { g(); } catch(e) { f(); } };
g();
}