File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -425,16 +425,14 @@ static PHP_METHOD(V8Js, __construct)
425
425
/* Create global template for global object */
426
426
// Now we are using multiple isolates this needs to be created for every context
427
427
428
- v8::Local<v8::FunctionTemplate> tpl = v8::FunctionTemplate::New (c->isolate , 0 );
429
-
430
- tpl->SetClassName (V8JS_SYM (" V8Js" ));
428
+ v8::Local<v8::ObjectTemplate> tpl = v8::ObjectTemplate::New (c->isolate );
431
429
c->global_template .Reset (isolate, tpl);
432
430
433
431
/* Register builtin methods */
434
- v8js_register_methods (tpl-> InstanceTemplate () , c);
432
+ v8js_register_methods (tpl, c);
435
433
436
434
/* Create context */
437
- v8::Local<v8::Context> context = v8::Context::New (isolate, &extension_conf, tpl-> InstanceTemplate () );
435
+ v8::Local<v8::Context> context = v8::Context::New (isolate, &extension_conf, tpl);
438
436
439
437
if (exts) {
440
438
v8js_free_ext_strarr (exts, exts_count);
Original file line number Diff line number Diff line change 18
18
19
19
/* Abbreviate long type names */
20
20
typedef v8::Persistent<v8::FunctionTemplate, v8::CopyablePersistentTraits<v8::FunctionTemplate> > v8js_function_tmpl_t ;
21
+ typedef v8::Persistent<v8::ObjectTemplate, v8::CopyablePersistentTraits<v8::ObjectTemplate> > v8js_object_tmpl_t ;
21
22
typedef v8::Persistent<v8::Object, v8::CopyablePersistentTraits<v8::Object> > v8js_persistent_obj_t ;
22
23
23
24
/* Forward declarations */
@@ -48,7 +49,7 @@ struct v8js_ctx {
48
49
bool memory_limit_hit;
49
50
long average_object_size;
50
51
51
- v8js_function_tmpl_t global_template;
52
+ v8js_object_tmpl_t global_template;
52
53
v8js_function_tmpl_t array_tmpl;
53
54
54
55
zval module_normaliser;
You can’t perform that action at this time.
0 commit comments