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

Unified Diff: runtime/vm/native_entry.h

Issue 2941643002: Check for a passed-in type argument vector in the prolog of generic functions. (Closed)
Patch Set: Created 3 years, 6 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.h
diff --git a/runtime/vm/native_entry.h b/runtime/vm/native_entry.h
index 200703f87199837ed75301a9524bd32056716e65..7a5be6e58012b4491aba7bd634b145da8bb2452a 100644
--- a/runtime/vm/native_entry.h
+++ b/runtime/vm/native_entry.h
@@ -53,7 +53,7 @@ typedef void (*NativeFunction)(NativeArguments* arguments);
#ifdef DEBUG
#define SET_NATIVE_RETVAL(args, value) \
RawObject* retval = value; \
- ASSERT(retval->IsDartInstance()); \
+ ASSERT(retval->IsDartInstance() || retval->IsTypeArguments()); \
rmacnak 2017/06/14 00:14:20 This makes me nervous. Is it possible to use a run
regis 2017/06/14 21:02:04 I first looked at a runtime call, but a native one
rmacnak 2017/06/15 00:03:27 Ah, I hadn't thought of factory type arguments. I
arguments->SetReturnUnsafe(retval);
#else
#define SET_NATIVE_RETVAL(arguments, value) arguments->SetReturnUnsafe(value);

Powered by Google App Engine
This is Rietveld 408576698