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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2509013002: Allocate generic types in new-space before canonicalizing. (Closed)
Patch Set: formatting Created 4 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/vm/code_generator.cc ('k') | runtime/vm/debugger_api_impl.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 8ff22bf2b15fd41b3e2b047a16b3f205ad9ec596..e5cf6ae42b6d7fd580c2346b723f7ec4f1550c95 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -2136,7 +2136,7 @@ DART_EXPORT Dart_Handle Dart_InstanceGetType(Dart_Handle instance) {
RETURN_TYPE_ERROR(Z, instance, Instance);
}
const AbstractType& type =
- AbstractType::Handle(Instance::Cast(obj).GetType());
+ AbstractType::Handle(Instance::Cast(obj).GetType(Heap::kNew));
return Api::NewHandle(T, type.Canonicalize());
}
@@ -4074,7 +4074,8 @@ DART_EXPORT Dart_Handle Dart_InvokeConstructor(Dart_Handle object,
// Construct name of the constructor to invoke.
const String& constructor_name = Api::UnwrapStringHandle(Z, name);
- const AbstractType& type_obj = AbstractType::Handle(Z, instance.GetType());
+ const AbstractType& type_obj =
+ AbstractType::Handle(Z, instance.GetType(Heap::kNew));
const Class& cls = Class::Handle(Z, type_obj.type_class());
const String& class_name = String::Handle(Z, cls.Name());
const Array& strings = Array::Handle(Z, Array::New(3));
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698