mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 19:51:51 +00:00
Make compatible with V8 3.25.12, fixes #88
This commit is contained in:
parent
bc86ce9e44
commit
1186e7951f
2
v8js.cc
2
v8js.cc
@ -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. */
|
||||
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? */
|
||||
if (script.IsEmpty()) {
|
||||
|
@ -333,7 +333,7 @@ V8JS_METHOD(require)
|
||||
zval_ptr_dtor(&module_code);
|
||||
|
||||
// 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
|
||||
if (script.IsEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user