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

Unified Diff: runtime/vm/isolate_reload.cc

Issue 2988493002: Reapply "Improve hashCode for closure objects" with fixes. (Closed)
Patch Set: Created 3 years, 5 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/dart_entry.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate_reload.cc
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 5537b5adc9e0e7288d1bf456c9859f8ef52a10fa..eeff480c8cbcb0fc97031550570608a9dc312f35 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -357,7 +357,11 @@ class BecomeMapTraits {
} else if (obj.IsField()) {
return String::HashRawSymbol(Field::Cast(obj).name());
} else if (obj.IsInstance()) {
- return Smi::Handle(Smi::RawCast(Instance::Cast(obj).HashCode())).Value();
+ Object& hashObj = Object::Handle(Instance::Cast(obj).HashCode());
+ if (hashObj.IsError()) {
+ Exceptions::PropagateError(Error::Cast(hashObj));
+ }
+ return Smi::Cast(hashObj).Value();
}
return 0;
}
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698