diff --git a/src/MethodProxies/ProxyInstrumentationDeactivator.class.st b/src/MethodProxies/ProxyInstrumentationDeactivator.class.st index fdef867..89dcfd5 100644 --- a/src/MethodProxies/ProxyInstrumentationDeactivator.class.st +++ b/src/MethodProxies/ProxyInstrumentationDeactivator.class.st @@ -18,3 +18,19 @@ ProxyInstrumentationDeactivator >> handler: anObject [ handler := anObject ] + +{ #category : #evaluating } +ProxyInstrumentationDeactivator >> value [ + + + "Slow path, an exception or a non local return happened" + | wasMeta me | + thisProcess shiftLevelUp. + + me := thisContext findContextSuchThat: [ :ctx | ctx isUnwindContext ]. + wasMeta := me tempNamed: 'wasMeta'. + handler aboutToReturnWithReceiver: me receiver arguments: me arguments. + thisProcess shiftLevelDown. + wasMeta ifTrue: [ thisProcess shiftLevelDown ]. + +]