@@ -119,7 +119,7 @@ static void v8js_free_storage(zend_object *object) /* {{{ */
119
119
}
120
120
c->call_impls .~map ();
121
121
122
- for (std::map<zend_function *, v8js_function_tmpl_t >::iterator it = c->method_tmpls .begin ();
122
+ for (std::map<std::pair<zend_class_entry *, zend_function *> , v8js_function_tmpl_t >::iterator it = c->method_tmpls .begin ();
123
123
it != c->method_tmpls .end (); ++it) {
124
124
it->second .Reset ();
125
125
}
@@ -232,7 +232,7 @@ static zend_object* v8js_new(zend_class_entry *ce) /* {{{ */
232
232
new (&c->weak_closures ) std::map<v8js_function_tmpl_t *, v8js_persistent_obj_t >();
233
233
new (&c->weak_objects ) std::map<zend_object *, v8js_persistent_obj_t >();
234
234
new (&c->call_impls ) std::map<v8js_function_tmpl_t *, v8js_function_tmpl_t >();
235
- new (&c->method_tmpls ) std::map<zend_function *, v8js_function_tmpl_t >();
235
+ new (&c->method_tmpls ) std::map<std::pair<zend_class_entry *, zend_function *> , v8js_function_tmpl_t >();
236
236
237
237
new (&c->v8js_v8objects ) std::list<v8js_v8object *>();
238
238
new (&c->script_objects ) std::vector<v8js_script *>();
@@ -589,7 +589,7 @@ static PHP_METHOD(V8Js, __construct)
589
589
ft = v8::FunctionTemplate::New (isolate, v8js_php_callback,
590
590
v8::External::New ((isolate), method_ptr));
591
591
// @fixme add/check Signature v8::Signature::New((isolate), tmpl));
592
- v8js_function_tmpl_t *persistent_ft = &c->method_tmpls [method_ptr];
592
+ v8js_function_tmpl_t *persistent_ft = &c->method_tmpls [std::make_pair (ce, method_ptr) ];
593
593
persistent_ft->Reset (isolate, ft);
594
594
595
595
php_obj->CreateDataProperty (context, method_name, ft->GetFunction (context).ToLocalChecked ());
0 commit comments