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

Unified Diff: runtime/vm/native_entry.cc

Issue 1705163003: Move native entry argument exception throwing code out of line (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
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,

Powered by Google App Engine
This is Rietveld 408576698