Updated callbacks

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Updated callbacks

Andreas.Raab
Hi Guys -

Just FYI, I found a major bug in the callback support I posted earlier.
The problem occurs if one fails a primitive *after* a callback has been
invoked like here:

Squeak -> (primitive) -> Plugin
                          Plugin -> (callback) -> Squeak
                          Plugin <-  (return)  <- Squeak
Squeak <-  (failure)  <- Plugin

In such a case, the method being activated by the primitive failure is
not the method originally invoking the primitive but rather the one that
returned from the callback. More technically speaking, the interpreter's
newMethod isn't preserved which causes the effect described above. The
attached version fixes the problem by preserving newMethod across
callback enter/return.

Cheers,
   - Andreas

Callbacks.2.cs (17K) Download Attachment