summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2022-07-06 10:01:58 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2022-07-07 16:58:21 +0000
commitd88c1499efe2f718f3cc1f45a3dc178471b22ce6 (patch)
treed28e20d9a4f87d2c1fc9a867b111cdc818ff250a /runtime/interpreter/interpreter.cc
parent4a21275dfb1bc58ede8141cbfd103ad46c3fcf2d (diff)
Fix one edge case at method linking to throw at runtime.
If we could not find a public implementation for a public method, throw an IllegalAccessError at runtime, when the method is actually called, instead of when the class is being created. Test: 840-resolution Test: 182-method-linking Change-Id: I741c7d0f6fc3b90a5d1614e1a9b76985a2eb32e2
Diffstat (limited to 'runtime/interpreter/interpreter.cc')
-rw-r--r--runtime/interpreter/interpreter.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc
index 311cb23510..0ffc38beeb 100644
--- a/runtime/interpreter/interpreter.cc
+++ b/runtime/interpreter/interpreter.cc
@@ -374,7 +374,7 @@ void EnterInterpreterFromInvoke(Thread* self,
num_ins = accessor.InsSize();
} else if (!method->IsInvokable()) {
self->EndAssertNoThreadSuspension(old_cause);
- method->ThrowInvocationTimeError();
+ method->ThrowInvocationTimeError(receiver);
return;
} else {
DCHECK(method->IsNative()) << method->PrettyMethod();