From 1186e7951f08dcbcc233582b425305ec8705aaef Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sat, 22 Mar 2014 17:58:38 +0100 Subject: [PATCH] Make compatible with V8 3.25.12, fixes #88 --- v8js.cc | 2 +- v8js_methods.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/v8js.cc b/v8js.cc index dec670a..5c7c2d8 100644 --- a/v8js.cc +++ b/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 source = V8JS_STRL(str, str_len); - v8::Local script = v8::Script::New(source, sname); + v8::Local script = v8::Script::Compile(source, sname); /* Compile errors? */ if (script.IsEmpty()) { diff --git a/v8js_methods.cc b/v8js_methods.cc index 9883592..d223d0a 100644 --- a/v8js_methods.cc +++ b/v8js_methods.cc @@ -333,7 +333,7 @@ V8JS_METHOD(require) zval_ptr_dtor(&module_code); // Create and compile script - v8::Local script = v8::Script::New(source, sname); + v8::Local script = v8::Script::Compile(source, sname); // The script will be empty if there are compile errors if (script.IsEmpty()) {