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

Unified Diff: runtime/vm/code_generator.cc

Issue 8528050: Fix throwing ObjectNotClosure instead of null exception if closure is null. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 1524)
+++ runtime/vm/code_generator.cc (working copy)
@@ -772,7 +772,7 @@
const Instance& bad_closure = Instance::CheckedHandle(arguments.At(0));
if (bad_closure.IsNull()) {
GrowableArray<const Object*> args;
- Exceptions::ThrowByType(Exceptions::kNullPointer, args);
+ Exceptions::ThrowByType(Exceptions::kObjectNotClosure, args);
}
// const Array& arguments = Array::CheckedHandle(arguments.At(1));
OS::PrintErr("object '%s' is not a closure\n", bad_closure.ToCString());

Powered by Google App Engine
This is Rietveld 408576698