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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2799373002: Pass a second type argument vector to all type instantiation calls in the VM. (Closed)
Patch Set: addressed comments Created 3 years, 8 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 | « runtime/vm/constants_dbc.h ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 212f270b6d4f5b5ae6e771a5f7b4b2035352718e..e64ea44870f0a948f1c89c004a3e25d26d379469 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -2001,6 +2001,7 @@ DART_EXPORT Dart_Handle Dart_ObjectIsType(Dart_Handle object,
CHECK_CALLBACK_STATE(T);
Error& malformed_type_error = Error::Handle(Z);
*value = instance.IsInstanceOf(type_obj, Object::null_type_arguments(),
+ Object::null_type_arguments(),
&malformed_type_error);
ASSERT(malformed_type_error.IsNull()); // Type was created from a class.
return Api::Success();
@@ -3873,9 +3874,12 @@ DART_EXPORT Dart_Handle Dart_New(Dart_Handle type,
if (!redirect_type.IsInstantiated()) {
// The type arguments of the redirection type are instantiated from the
// type arguments of the type argument.
+ // We do not support generic constructors.
+ ASSERT(redirect_type.IsInstantiated(kFunctions));
Error& bound_error = Error::Handle();
redirect_type ^= redirect_type.InstantiateFrom(
- type_arguments, &bound_error, NULL, NULL, Heap::kNew);
+ type_arguments, Object::null_type_arguments(), &bound_error, NULL,
+ NULL, Heap::kNew);
if (!bound_error.IsNull()) {
return Api::NewHandle(T, bound_error.raw());
}
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698