Index: runtime/vm/native_entry.cc |
diff --git a/runtime/vm/native_entry.cc b/runtime/vm/native_entry.cc |
index 34ea4bf64fb5c5998f56ec9eb4c502f24e2ea5b8..a28a77960468e4057a9796e065f58092bc358b8a 100644 |
--- a/runtime/vm/native_entry.cc |
+++ b/runtime/vm/native_entry.cc |
@@ -24,6 +24,13 @@ DEFINE_FLAG(bool, trace_natives, false, |
"Trace invocation of natives (debug mode only)"); |
+void DartNativeThrowArgumentException(const Instance& instance) { |
+ const Array& __args__ = Array::Handle(Array::New(1)); |
+ __args__.SetAt(0, instance); |
+ Exceptions::ThrowByType(Exceptions::kArgument, __args__); |
+} |
+ |
+ |
NativeFunction NativeEntry::ResolveNative(const Library& library, |
const String& function_name, |
int number_of_arguments, |