diff options
author | 2015-06-19 18:35:41 +0100 | |
---|---|---|
committer | 2015-06-19 18:42:17 +0100 | |
commit | af268bbc4fbd0b9847acf1f7b79c038806118467 (patch) | |
tree | 66c3c20a7776cd27368dfcccc307af4745dc6057 /compiler/optimizing/builder.cc | |
parent | 87a135e8699119c9ef99b0221acf481d7d6501d4 (diff) |
Use IsAssignableFrom instead of IsSubclass for robustness.
We can get interface methods as referrer. Instead of crashing,
just use IsAssignableFrom.
bug:21870666
Change-Id: I7978e36fb981d44611635fbaf3899138bae60672
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r-- | compiler/optimizing/builder.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index b568f31a57..501a1dd72c 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -697,7 +697,7 @@ bool HGraphBuilder::BuildInvoke(const Instruction& instruction, &storage_index); } - if (referrer_class.Get()->IsSubClass(resolved_method->GetDeclaringClass())) { + if (resolved_method->GetDeclaringClass()->IsAssignableFrom(referrer_class.Get())) { // If the referrer class is the declaring class or a subclass // of the declaring class, no class initialization is needed // before the static method call. |