0
0
mirror of https://github.com/phpv8/v8js.git synced 2025-01-03 15:41:55 +00:00

Merge pull request #77 from cscott/minor-fixes

A pair of minor fixes
This commit is contained in:
Patrick Reilly 2013-10-30 11:45:03 -07:00
commit e68d7073de
9 changed files with 18 additions and 20 deletions

View File

@ -19,7 +19,7 @@ try {
?>
===EOF===
--EXPECTF--
object(V8JsScriptException)#2 (11) {
object(V8JsScriptException)#%d (11) {
["message":protected]=>
string(75) "exception.js:1: ReferenceError: this_function_does_not_exist is not defined"
["string":"Exception":private]=>

View File

@ -33,7 +33,7 @@ try {
?>
===EOF===
--EXPECTF--
object(V8JsScriptException)#3 (11) {
object(V8JsScriptException)#%d (11) {
["message":protected]=>
string(49) "throw_0:1: ReferenceError: fooobar is not defined"
["string":"Exception":private]=>

View File

@ -20,8 +20,8 @@ try {
}
?>
===EOF===
--EXPECT--
object(V8Object)#2 (1) {
--EXPECTF--
object(V8Object)#%d (1) {
["hello"]=>
string(5) "world"
}

View File

@ -22,10 +22,10 @@ try {
}
?>
===EOF===
--EXPECT--
--EXPECTF--
array(2) {
[0]=>
object(V8Object)#3 (6) {
object(V8Object)#%d (6) {
["0"]=>
string(1) "F"
["1"]=>
@ -40,7 +40,7 @@ array(2) {
string(1) "r"
}
[1]=>
object(V8Object)#4 (2) {
object(V8Object)#%d (2) {
["0"]=>
string(3) "foo"
["1"]=>

View File

@ -42,7 +42,7 @@ try {
ctor called (php)
Hello John
caught js exception
object(V8JsScriptException)#3 (11) {
object(V8JsScriptException)#%d (11) {
["message":protected]=>
string(56) "ctor-test:4: Call to protected __construct() not allowed"
["string":"Exception":private]=>

View File

@ -71,7 +71,7 @@ try {
?>
===EOF===
--EXPECT--
--EXPECTF--
array(2) {
[0]=>
string(4) "arg1"
@ -113,7 +113,7 @@ Mon, 08 Sep 1975 09:00:00 +0000
string(3) "foo"
array(3) {
[0]=>
object(Testing)#2 (3) {
object(Testing)#%d (3) {
["foo"]=>
string(8) "ORIGINAL"
["my_private":"Testing":private]=>
@ -137,7 +137,7 @@ array(3) {
[1]=>
string(3) "bar"
[2]=>
object(Testing)#2 (3) {
object(Testing)#%d (3) {
["foo"]=>
string(8) "ORIGINAL"
["my_private":"Testing":private]=>

View File

@ -34,12 +34,12 @@ $a->test_two = new A();
$a->executeString($js, 'foo');
?>
===EOF===
--EXPECT--
--EXPECTF--
array(2) {
[0]=>
string(6) "Foobar"
[1]=>
object(V8Object)#4 (2) {
object(V8Object)#%d (2) {
["0"]=>
string(3) "foo"
["1"]=>
@ -50,7 +50,7 @@ array(2) {
[0]=>
string(6) "Foobar"
[1]=>
object(V8Object)#4 (2) {
object(V8Object)#%d (2) {
["0"]=>
string(3) "foo"
["1"]=>
@ -61,7 +61,7 @@ array(2) {
[0]=>
string(5) "a,b,c"
[1]=>
object(V8Object)#4 (2) {
object(V8Object)#%d (2) {
["0"]=>
string(3) "foo"
["1"]=>
@ -72,7 +72,7 @@ array(2) {
[0]=>
string(5) "a,b,c"
[1]=>
object(V8Object)#4 (2) {
object(V8Object)#%d (2) {
["0"]=>
string(3) "foo"
["1"]=>

View File

@ -41,9 +41,9 @@ var_dump($a->executeString("test(true);", "test8.js"));
var_dump($a->executeString("test(false);", "test9.js"));
?>
===EOF===
--EXPECT--
--EXPECTF--
NULL
object(Testing)#2 (3) {
object(Testing)#%d (3) {
["foo"]=>
string(8) "ORIGINAL"
["my_private":"Testing":private]=>

View File

@ -257,9 +257,7 @@ static int _php_v8js_is_assoc_array(HashTable *myht TSRMLS_DC) /* {{{ */
/* }}} */
static void php_v8js_weak_object_callback(const v8::WeakCallbackData<v8::Object, zval> &data) {
v8::Isolate *isolate = data.GetIsolate();
zval *value = data.GetParameter();
V8JS_TSRMLS_FETCH();
zval_ptr_dtor(&value);
v8::V8::AdjustAmountOfExternalAllocatedMemory(-1024);