diff --git a/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotLanguageContext.java b/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotLanguageContext.java index e4d2056fc56a..348f7c225d71 100644 --- a/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotLanguageContext.java +++ b/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotLanguageContext.java @@ -624,7 +624,7 @@ void ensureCreated(PolyglotLanguage accessingLanguage) { PolyglotThreadAccessException threadAccessException = null; LOOP: for (;;) { if (threadAccessException != null) { - throw threadAccessException.rethrow(this); + throw threadAccessException.rethrow(context); } synchronized (context) { if (!created) { diff --git a/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotThreadAccessException.java b/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotThreadAccessException.java index e0f1046c40d1..1d24a6e357ba 100644 --- a/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotThreadAccessException.java +++ b/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotThreadAccessException.java @@ -47,7 +47,7 @@ final class PolyglotThreadAccessException extends Exception { super(message); } - RuntimeException rethrow(Object noLockCheck) { + RuntimeException rethrow(PolyglotContextImpl noLockCheck) { assert !Thread.holdsLock(noLockCheck) : "Only rethrow without holding internal lock"; throw PolyglotEngineException.illegalState(getMessage()); }