Index: runtime/lib/errors.cc |
diff --git a/runtime/lib/errors.cc b/runtime/lib/errors.cc |
index 390079fa7d46f8dfc05777a9f0b733c41973d812..27770a92f191954251a8ccf301773ab026f63282 100644 |
--- a/runtime/lib/errors.cc |
+++ b/runtime/lib/errors.cc |
@@ -117,7 +117,8 @@ DEFINE_NATIVE_ENTRY(TypeError_throwNew, 5) { |
AbstractType::CheckedHandle(arguments->NativeArgAt(2)); |
const String& dst_name = String::CheckedHandle(arguments->NativeArgAt(3)); |
const String& error_msg = String::CheckedHandle(arguments->NativeArgAt(4)); |
- const AbstractType& src_type = AbstractType::Handle(src_value.GetType()); |
+ const AbstractType& src_type = |
+ AbstractType::Handle(src_value.GetType(Heap::kNew)); |
Exceptions::CreateAndThrowTypeError(location, src_type, dst_type, dst_name, |
error_msg); |
UNREACHABLE(); |