File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ var jsfunc = function() {
1111 var start = (new Date()).getTime();
1212
1313 var text = "abcdefghijklmnopqrstuvwyxz0123456789";
14- while ((new Date()).getTime() - start < 500 ) {
15- /* pass at least 500ms in the loop so the timer loop has plenty of
14+ while ((new Date()).getTime() - start < 800 ) {
15+ /* pass at least 800ms in the loop so the timer loop has plenty of
1616 * time to trigger. */
1717 var encoded = encodeURI(text);
1818 }
2222
2323$ v8 = new V8Js ();
2424/* Set very short time limit, but enough so v8 can start up safely. */
25- $ v8 ->setTimeLimit (100 );
25+ $ v8 ->setTimeLimit (200 );
2626
2727$ v8 ->incrTimeLimit = function () use ($ v8 ) {
28- $ v8 ->setTimeLimit (300 );
28+ $ v8 ->setTimeLimit (500 );
2929};
3030
3131$ func = $ v8 ->executeString ($ JS );
4343object(V8Function)#%d (0) {
4444}
4545V8JsTimeLimitException
46- Script time limit of 300 milliseconds exceeded
46+ Script time limit of 500 milliseconds exceeded
4747===EOF===
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Test V8::setTimeLimit() : Time limit can be prolonged
77
88$ JS = <<< EOT
99var text = "abcdefghijklmnopqrstuvwyxz0123456789";
10- /* Spend 30 * >10ms in the loop, i.e. at least 300ms ; hence
10+ /* Spend 75 * >10ms in the loop, i.e. at least 750ms ; hence
1111 * it should be killed if prolonging doesn't work. */
1212for (var j = 0; j < 30; ++j) {
1313 PHP.prolongTimeLimit();
@@ -22,10 +22,10 @@ for (var j = 0; j < 30; ++j) {
2222EOT ;
2323
2424$ v8 = new V8Js ();
25- $ v8 ->setTimeLimit (100 );
25+ $ v8 ->setTimeLimit (300 );
2626
2727$ v8 ->prolongTimeLimit = function () use ($ v8 ) {
28- $ v8 ->setTimeLimit (100 );
28+ $ v8 ->setTimeLimit (300 );
2929};
3030
3131$ v8 ->executeString ($ JS );
You can’t perform that action at this time.
0 commit comments