[Vm-dev] SqueakJS JSBridge

Jerry Bell jdbellomm at gmail.com
Sat Jan 31 14:51:51 UTC 2015


Hi Bert,

I saw your fix, thanks very much!

Jerry

On Fri, Jan 30, 2015 at 5:37 AM, Bert Freudenberg <bert at freudenbergs.de>
wrote:

>
> On 29.01.2015, at 20:10, Jerry Bell <jdbellomm at gmail.com> wrote:
>
>
> Hello,
>
> I'm trying to run the JSBridge callback example from a 4.5 image.
> JSBridge.st is loaded and I'm running under Chrome on Windows.   I get an
> error: "Error:primReturnFromCallback: failed.  " Digging a little in the
> debugger, I find in JSObjectProxy>>handleCallback, result is : "Error:
> Error: This block accepts 2 arguments, but was called with 0 arguments".
>
> Modifying the example with a callback block with 0 arguments works.
>
>
> Hi Jerry,
>
> you found a bug :)
>
> Apparently I’ve never tested this with block closures, only with block
> contexts.
>
> I created an issue: https://github.com/bertfreudenberg/SqueakJS/issues/29
>
> But I think it’s going to be trivial to fix. We just have to handle both
> blocks and closures in js_primitiveGetActiveCallbackArgs():
>
> https://github.com/bertfreudenberg/SqueakJS/blob/3c137c6f930259d0bcf02d5f80a86ee1457f17fe/vm.js#L6010
>
> - Bert -
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150131/d7620bbc/attachment.htm


More information about the Vm-dev mailing list