Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 2366142b7a56dacf9e74fbdcb5ace7e723b849d9..c65d4846464ea0e9034cc3fde71ccd7ffabee24e 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -2602,7 +2602,8 @@ void Class::CalculateFieldOffsets() const { |
RawFunction* Class::GetInvocationDispatcher(const String& target_name, |
const Array& args_desc, |
- RawFunction::Kind kind) const { |
+ RawFunction::Kind kind, |
+ bool create_if_absent) const { |
enum { |
kNameIndex = 0, |
kArgsDescIndex, |
@@ -2632,7 +2633,7 @@ RawFunction* Class::GetInvocationDispatcher(const String& target_name, |
} |
} |
- if (dispatcher.IsNull()) { |
+ if (dispatcher.IsNull() && create_if_absent) { |
if (i == cache.Length()) { |
// Allocate new larger cache. |
intptr_t new_len = (cache.Length() == 0) |