-
Notifications
You must be signed in to change notification settings - Fork 202
Problem handling Class Inheritance #410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Interesting catch, it's related to the diff --git a/v8js_object_export.cc b/v8js_object_export.cc
index b36574c..0aaa0e3 100644
--- a/v8js_object_export.cc
+++ b/v8js_object_export.cc
@@ -699,11 +699,11 @@ v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::Name> property_n
}
} else {
v8::Local<v8::FunctionTemplate> ft;
- try {
+ /* try {
ft = v8::Local<v8::FunctionTemplate>::New
(isolate, ctx->method_tmpls.at(method_ptr));
}
- catch (const std::out_of_range &) {
+ catch (const std::out_of_range &) */ {
ft = v8::FunctionTemplate::New(isolate, v8js_php_callback,
v8::External::New((isolate), method_ptr),
v8::Signature::New((isolate), tmpl)); ... it works :) Of course this is not a proper solution, but shows the cause of the problem. The cache is solely based on |
stesie
added a commit
to stesie/v8js
that referenced
this issue
Jun 22, 2019
stesie
added a commit
that referenced
this issue
Jun 22, 2019
thanks @stesie |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is related to #386 , but enriched.
I dont know if the problem is in v8js or v8, I tried hard to follow the code of the extension and I have my doubts.
Code that produces the error:
Execution Output:
Tip 1 - If we just compile ... everything looks ok
(Just look at the end of the code snippet and un/comment as showed here)
Execution output: Nothing (ok?)
Ok, solutions/workarounds ?
1) Use __call to call methods in class
2) Re-declare your derived clases like so:
My environment:
OS: LINUX UBUNTU
PHP info
V8JS info
I hope to get a better understanding regarding this.
The text was updated successfully, but these errors were encountered: