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

Unified Diff: runtime/vm/snapshot.cc

Issue 11415028: Remove NullPointerException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed VM bugs. Created 8 years, 1 month 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
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index c11e3213f0c4c09687517210b29cd88edcf94bc4..044d34bdf097248099afdc8dca0ba901a4bfa53a 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -818,7 +818,7 @@ void SnapshotWriter::WriteObjectRef(RawObject* raw) {
if (class_id >= kNumPredefinedCids) {
if (Class::IsSignatureClass(cls)) {
// We do not allow closure objects in an isolate message.
- set_exception_type(Exceptions::kArgumentError);
+ set_exception_type(Exceptions::kArgument);
// TODO(6726): Allocate these constant strings once in the VM isolate.
set_exception_msg("Illegal argument in isolate message"
" : (object is a closure)");
@@ -1073,7 +1073,7 @@ void SnapshotWriter::WriteInlinedObject(RawObject* raw) {
if (class_id >= kNumPredefinedCids) {
if (Class::IsSignatureClass(cls)) {
// We do not allow closure objects in an isolate message.
- set_exception_type(Exceptions::kArgumentError);
+ set_exception_type(Exceptions::kArgument);
// TODO(6726): Allocate these constant strings once in the VM isolate.
set_exception_msg("Illegal argument in isolate message"
" : (object is a closure)");
@@ -1081,7 +1081,7 @@ void SnapshotWriter::WriteInlinedObject(RawObject* raw) {
}
if (cls->ptr()->num_native_fields_ != 0) {
// We do not allow objects with native fields in an isolate message.
- set_exception_type(Exceptions::kArgumentError);
+ set_exception_type(Exceptions::kArgument);
// TODO(6726): Allocate these constant strings once in the VM isolate.
set_exception_msg("Illegal argument in isolate message"
" : (object extends NativeWrapper)");

Powered by Google App Engine
This is Rietveld 408576698