Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Unified Diff: runtime/lib/errors.cc

Issue 2997993002: Revert "Reapply "Eliminate dependencies on assemblers and code stubs in precompiled runtime."" (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/errors.cc
diff --git a/runtime/lib/errors.cc b/runtime/lib/errors.cc
index c0dc5882f417603034fa6a097f3bed0715e699e5..4783d4d57595949c195818a9c0201154f527f4d0 100644
--- a/runtime/lib/errors.cc
+++ b/runtime/lib/errors.cc
@@ -14,15 +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 defined(DART_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._evaluateAssertion frame
- return Exceptions::GetCallerScript(iterator);
-#else
+ 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._evaluateAssertion frame
+ return Exceptions::GetCallerScript(iterator);
+ }
StackFrame* stack_frame = iterator->NextFrame();
Code& code = Code::Handle();
Function& func = Function::Handle();
@@ -56,7 +56,6 @@ static RawScript* FindScript(DartFrameIterator* iterator) {
}
UNREACHABLE();
return Script::null();
-#endif // defined(DART_PRECOMPILED_RUNTIME)
}
// Allocate and throw a new AssertionError.
« no previous file with comments | « no previous file | runtime/vm/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698