You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No instance of overloaded function "v8::Local<T>::New [with T=v8::Function]" matches the argument list. Argument types are: (v8:Isolate *(), v8::Persistent<v8::FunctionTemplate, v8::NonCopyablePersistentTraits<V8::Functiontemplate>>)
I can't find an example of this pattern in the io.js source, and the closest google result is an unanswered SO question. I found one example where a factory method was added to Bar but that seems like it should be unnecessary. Any tips on the pattern to use here? Thanks.
The text was updated successfully, but these errors were encountered:
Fishrock123
added
the
c++
Issues and PRs that require attention from people who are familiar with C++.
label
Jul 30, 2015
Bar::constructor is a Persistent<Function>? You need to turn it into a Local first: Local<Function> constructor = Local<Function>::New(isolate, Bar::constructor);.
I think that's what I did in the 3rd line of my example unless I'm misreading.
But, Bar::constructor is actually a Persistent<FunctionTemplate>, not a Function. That's what the package I'm updating (node-canvas) had originally and, from my understanding, is the correct type to use for a class returned to JS.
I have two C++ classes. A method on one of them is supposed to return a new instance of
b
. I tried to follow the pattern described here:but then:
I can't find an example of this pattern in the io.js source, and the closest google result is an unanswered SO question. I found one example where a factory method was added to
Bar
but that seems like it should be unnecessary. Any tips on the pattern to use here? Thanks.The text was updated successfully, but these errors were encountered: