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

Unified Diff: runtime/lib/errors.cc

Issue 2558993005: Revert "Add optional message argument to assert statements in the VM." (Closed)
Patch Set: Created 4 years 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/lib/errors_patch.dart » ('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 9eb89177708548289daeeb50b15cd4f219f908ca..27770a92f191954251a8ccf301773ab026f63282 100644
--- a/runtime/lib/errors.cc
+++ b/runtime/lib/errors.cc
@@ -62,9 +62,8 @@ static RawScript* FindScript(DartFrameIterator* iterator) {
// Allocate and throw a new AssertionError.
// Arg0: index of the first token of the failed assertion.
// Arg1: index of the first token after the failed assertion.
-// Arg2: Message object or null.
// Return value: none, throws an exception.
-DEFINE_NATIVE_ENTRY(AssertionError_throwNew, 3) {
+DEFINE_NATIVE_ENTRY(AssertionError_throwNew, 2) {
// No need to type check the arguments. This function can only be called
// internally from the VM.
const TokenPosition assertion_start =
@@ -72,8 +71,7 @@ DEFINE_NATIVE_ENTRY(AssertionError_throwNew, 3) {
const TokenPosition assertion_end =
TokenPosition(Smi::CheckedHandle(arguments->NativeArgAt(1)).Value());
- const Instance& message = Instance::CheckedHandle(arguments->NativeArgAt(2));
- const Array& args = Array::Handle(Array::New(5));
+ const Array& args = Array::Handle(Array::New(4));
DartFrameIterator iterator;
iterator.NextFrame(); // Skip native call.
@@ -94,7 +92,6 @@ DEFINE_NATIVE_ENTRY(AssertionError_throwNew, 3) {
args.SetAt(1, String::Handle(script.url()));
args.SetAt(2, Smi::Handle(Smi::New(from_line)));
args.SetAt(3, Smi::Handle(Smi::New(script.HasSource() ? from_column : -1)));
- args.SetAt(4, message);
Exceptions::ThrowByType(Exceptions::kAssertion, args);
UNREACHABLE();
« no previous file with comments | « no previous file | runtime/lib/errors_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698