Bug#551251: libjavascript-perl: FTBFS: failed test

Mike Hommey mh at glandium.org
Sat Oct 24 12:48:37 UTC 2009


On Fri, Oct 16, 2009 at 10:31:23PM +0200, gregor herrmann wrote:
> From t/21-branch-handler.t:
> 
> 22 $cx1->set_branch_handler(\&branch_handler);
> 23 $cx1->eval("for(i = 0; i < 10; i++) {}");
> 24 is($called, 10);
> 
> 
> Hm, I guess it's not that easy :)

It's actually almost that easy. You should also change the
PJS_branch_handler definition to drop its second argument.

As for the test, with the API change, the assumption that the "branch"
handler is going to be called at each for iteration becomes wrong, which
is why the test fails.

Unfortunately, while I have been able to verify that indeed the callback
is properly called by the JS engine if I hack the JSContext members to
make it happen, I couldn't get it to trigger under normal conditions
with an eval()ed script :(

Mike



More information about the pkg-mozilla-maintainers mailing list