Skip to content

Instantly share code, notes, and snippets.

@kevinw
Created April 12, 2012 03:12
Show Gist options
  • Save kevinw/2364414 to your computer and use it in GitHub Desktop.
Save kevinw/2364414 to your computer and use it in GitHub Desktop.
v8Js segfault with nested callbacks
<?php
$v8=new v8Js('SERVER');
$v8->serverCb = function($cb) { return call_user_func_array($cb, array(1,2,3))."42"; };
$v8->log = function($msg) { print $msg; };
for ($i =0; $i < 10; ++$i) {
$v8->executeString("var res = SERVER.serverCb(function() {return 'fromJSCB' }); SERVER.log(res); ");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment