Jakob, you rule. That in fact fixed all my problems. Thanks to you and Zac
for all the guidance!
On Thursday, June 21, 2018 at 11:12:24 PM UTC+2, Jakob Kummerow wrote:
>
> The Local class defines an operator == that should do exactly what you
> need.
>
> On Thu, Jun 21, 2018 at 5:43 AM Gonzalo
The Local class defines an operator == that should do exactly what you need.
On Thu, Jun 21, 2018 at 5:43 AM Gonzalo Diethelm
wrote:
> Sure, slot does have a value, I just didn't include it in the code.
> Something like:
>
> Local slot = String::NewFromUtf8(isolate, "MyBeautifulSlot",
>
Sure, slot does have a value, I just didn't include it in the code.
Something like:
Local slot = String::NewFromUtf8(isolate, "MyBeautifulSlot",
NewStringType::kNormal).ToLocalChecked();
Cheers!
On Thursday, June 21, 2018 at 2:27:00 PM UTC+2, Zac Hansen wrote:
>
> You're dereferencing a
You're dereferencing a "super pointer" to get to a "pointer", hence * not
&. You can't "go back" because the local/global represents an
"reference count" to the object which must be known to the JS runtime.
As for p0 and p1, have you tried setting slot to a fixed string value
before using
Note to self: this might be related to Local vs Global (or
Persistent? so many names...)
Need to look into that.
On Thursday, June 21, 2018 at 7:58:37 AM UTC+2, Gonzalo Diethelm wrote:
>
> I run the following JS code in the Chrome console:
>
> // Version 67.0.3396.87 (Official Build) (64-bit)
>
Never mind my last question, it didn't really make much sense.
So, I have found some basic behaviour related to this, which really
surprised me:
Local parent; // this will be a JS object
Local slot;// this will be a new slot in parent
Local object = // this will be the value we want to
Thanks, that is useful (not sure why it is unary * instead of unary &, but
meh).
Do you know if there is any way to then go from the T* back into the
Local? Something like:
Handle object = Object::New(isolate);
Local ret = Local::Cast(object);
Object* ptr = *object; // this works, according to
unary * on a local gives a
T*:
https://v8.paulfryzel.com/docs/master/classv8_1_1_local.html#a3c96c0bc5db1288bad5769e8e54e26da
On Wednesday, June 20, 2018 at 10:58:37 PM UTC-7, Gonzalo Diethelm wrote:
>
> I run the following JS code in the Chrome console:
>
> // Version 67.0.3396.87 (Official