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

Unified Diff: runtime/vm/object.cc

Issue 1914343002: Dump more info before crashing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 1ab9dd05258e425f46f1bf51d444096dedb6b7af..ff46fbfa70fdca4a158ef4ad7afe01569dab0700 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -6418,6 +6418,23 @@ bool Function::TestParameterType(
Heap::Space space) const {
AbstractType& other_param_type =
AbstractType::Handle(other.ParameterTypeAt(other_parameter_position));
+
+ // TODO(regis): Remove this debugging code.
+ if (other_param_type.IsNull()) {
+ const Class& owner = Class::Handle(Owner());
+ const Class& other_owner = Class::Handle(other.Owner());
+ THR_Print("*** null other_param_type ***\n");
+ THR_Print("parameter_position: %" Pd "\n", parameter_position);
+ THR_Print("other_parameter_position: %" Pd "\n", other_parameter_position);
+ THR_Print("function: %s\n", ToCString());
+ THR_Print("function owner: %s\n", owner.ToCString());
+ THR_Print("other function: %s\n", other.ToCString());
+ THR_Print("other function owner: %s\n", other_owner.ToCString());
+ AbstractType& param_type =
+ AbstractType::Handle(ParameterTypeAt(parameter_position));
+ THR_Print("param_type: %s\n", param_type.ToCString());
+ }
+
if (!other_param_type.IsInstantiated()) {
other_param_type =
other_param_type.InstantiateFrom(other_type_arguments,
@@ -6432,6 +6449,21 @@ bool Function::TestParameterType(
}
AbstractType& param_type =
AbstractType::Handle(ParameterTypeAt(parameter_position));
+
+ // TODO(regis): Remove this debugging code.
+ if (param_type.IsNull()) {
+ const Class& owner = Class::Handle(Owner());
+ const Class& other_owner = Class::Handle(other.Owner());
+ THR_Print("*** null param_type ***\n");
+ THR_Print("parameter_position: %" Pd "\n", parameter_position);
+ THR_Print("other_parameter_position: %" Pd "\n", other_parameter_position);
+ THR_Print("function: %s\n", ToCString());
+ THR_Print("function owner: %s\n", owner.ToCString());
+ THR_Print("other function: %s\n", other.ToCString());
+ THR_Print("other function owner: %s\n", other_owner.ToCString());
+ THR_Print("other_param_type: %s\n", other_param_type.ToCString());
+ }
+
if (!param_type.IsInstantiated()) {
param_type = param_type.InstantiateFrom(type_arguments,
bound_error,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698