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

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
« no previous file with comments | « runtime/lib/integers.dart ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 1537)
+++ runtime/vm/code_generator.cc (working copy)
@@ -643,10 +643,7 @@
return; // Return closure object.
}
}
- Exceptions::ThrowByType(
- result.IsNull() ? Exceptions::kNullPointer :
- Exceptions::kObjectNotClosure,
- invoke_arguments);
+ Exceptions::ThrowByType(Exceptions::kObjectNotClosure, invoke_arguments);
}
@@ -772,7 +769,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());
« no previous file with comments | « runtime/lib/integers.dart ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698