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

Unified Diff: runtime/lib/integers.cc

Issue 8476002: Fix more co19 crashes. Introduce GET_NATIVE_ARGUMENT that throws an illegal argument exception if... (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/error.cc ('k') | runtime/lib/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/integers.cc
===================================================================
--- runtime/lib/integers.cc (revision 1200)
+++ runtime/lib/integers.cc (working copy)
@@ -6,6 +6,7 @@
#include "vm/bigint_operations.h"
#include "vm/dart_entry.h"
+#include "vm/exceptions.h"
#include "vm/native_entry.h"
#include "vm/object.h"
@@ -483,8 +484,9 @@
const Integer& value,
const Smi& amount) {
if (amount.Value() < 0) {
- // TODO(srdjan): Throw exception maybe.
- UNIMPLEMENTED();
+ GrowableArray<const Object*> args;
+ args.Add(&amount);
+ Exceptions::ThrowByType(Exceptions::kIllegalArgument, args);
}
if (value.IsSmi()) {
Smi& smi_value = Smi::Handle();
« no previous file with comments | « runtime/lib/error.cc ('k') | runtime/lib/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698