Use old assertion text script in precompiled mode

BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2466533003 .
This commit is contained in:
John McCutchan 2016-10-31 09:13:55 -07:00
parent 3319e6d0e3
commit d62e41fcea
2 changed files with 12 additions and 0 deletions

View file

@ -14,6 +14,15 @@ namespace dart {
// Scan the stack until we hit the first function in the _AssertionError
// class. We then return the next frame's script taking inlining into account.
static RawScript* FindScript(DartFrameIterator* iterator) {
if (FLAG_precompiled_runtime) {
// The precompiled runtime faces two issues in recovering the correct
// assertion text. First, the precompiled runtime does not include
// the inlining meta-data so we cannot walk the inline-aware stack trace.
// Second, the script text itself is missing so whatever script is returned
// from here will be missing the assertion expression text.
iterator->NextFrame(); // Skip _AssertionError._checkAssertion frame
return Exceptions::GetCallerScript(iterator);
}
StackFrame* stack_frame = iterator->NextFrame();
Code& code = Code::Handle();
Function& func = Function::Handle();

View file

@ -148,6 +148,9 @@ issue23244_test: Fail # Issue 23244
[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) && (($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) || $runtime == drt || $runtime == dartium) && $arch == ia32 ]
vm/regress_24517_test: Pass, Fail # Issue 24517.
[ $compiler == precompiler && $runtime == dart_precompiled ]
vm/regress_27671_test: Skip # Unsupported
[ $noopt || $compiler == precompiler ]
# Stacktraces in precompilation omit inlined frames.
full_stacktrace1_test: Pass, RuntimeError