Quellcode durchsuchen

Make compatible with V8 3.25.12, fixes #88

Stefan Siegl vor 11 Jahren
Ursprung
Commit
1186e7951f
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 1 1
      v8js.cc
  2. 1 1
      v8js_methods.cc

+ 1 - 1
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()) {

+ 1 - 1
v8js_methods.cc

@@ -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()) {