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

Unified Diff: runtime/vm/exceptions.cc

Issue 10392016: Fix issue 2939, revert previous change that accepted null as excpetion objects: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.cc
===================================================================
--- runtime/vm/exceptions.cc (revision 7471)
+++ runtime/vm/exceptions.cc (working copy)
@@ -63,8 +63,13 @@
}
-static void ThrowExceptionHelper(const Instance& exception,
+static void ThrowExceptionHelper(const Instance& incoming_exception,
const Instance& existing_stacktrace) {
+ Instance& exception = Instance::Handle(incoming_exception.raw());
+ if (exception.IsNull()) {
+ GrowableArray<const Object*> arguments;
+ exception ^= Exceptions::Create(Exceptions::kNullPointer, arguments);
+ }
uword handler_pc = 0;
uword handler_sp = 0;
uword handler_fp = 0;
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698