0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-23 04:51:53 +00:00

Make compatible with V8 3.25.12, fixes #88

This commit is contained in:
Stefan Siegl 2014-03-22 17:58:38 +01:00
parent bc86ce9e44
commit 1186e7951f
2 changed files with 2 additions and 2 deletions

View File

@ -1053,7 +1053,7 @@ static PHP_METHOD(V8Js, executeString)
/* Compiles a string context independently. TODO: Add a php function which calls this and returns the result as resource which can be executed later. */ /* Compiles a string context independently. TODO: Add a php function which calls this and returns the result as resource which can be executed later. */
v8::Local<v8::String> source = V8JS_STRL(str, str_len); v8::Local<v8::String> source = V8JS_STRL(str, str_len);
v8::Local<v8::Script> script = v8::Script::New(source, sname); v8::Local<v8::Script> script = v8::Script::Compile(source, sname);
/* Compile errors? */ /* Compile errors? */
if (script.IsEmpty()) { if (script.IsEmpty()) {

View File

@ -333,7 +333,7 @@ V8JS_METHOD(require)
zval_ptr_dtor(&module_code); zval_ptr_dtor(&module_code);
// Create and compile script // Create and compile script
v8::Local<v8::Script> script = v8::Script::New(source, sname); v8::Local<v8::Script> script = v8::Script::Compile(source, sname);
// The script will be empty if there are compile errors // The script will be empty if there are compile errors
if (script.IsEmpty()) { if (script.IsEmpty()) {