Thanks Ben!
Yes, I am aware of this but actually I need to retrieve this external data
*before* creating an instance using the function. Here's an example:
var myFunc = MyCustomFunction; // Here MyCustomFunction is an instance of
Local that I have registered on the global object
On Tue, Mar 19, 2019 at 9:41 AM Darin Dimitrov wrote:
>
> I am trying to associate an internal field with a Local created
> from a Local:
>
> Local ctorFuncTemplate = FunctionTemplate::New(isolate);
>
> Local ctorFunc =
> ctorFuncTemplate->GetFunction(context).ToLocalChecked();
>
>
I am trying to associate an internal field with a Local created
from a Local:
Local ctorFuncTemplate = FunctionTemplate::New(isolate);
Local ctorFunc =
ctorFuncTemplate->GetFunction(context).ToLocalChecked();
ctorFunc->SetInternalField(0, External::New(isolate, ptr));
This fails with