Thank you Ben! So I can use the GetIdentityHash() function to obtain an ID of the object. But will this ID be different, if I have two different handlerFunction object but they are trying to call the same function but with different arguments? I'm basically trying to find a way to tell if two handlerFunction contains the same callback function.
Best regards, On Sunday, February 26, 2017 at 5:34:14 AM UTC-5, Ben Noordhuis wrote: > > On Sun, Feb 26, 2017 at 2:18 AM, <[email protected] <javascript:>> wrote: > > Dear all, > > > > I'm doing research on web java-script event execution with chromium, and > I'm > > trying to log the function address of javascript listener function. > > > > Currently I have found the v8::Local<v8::Function> object that holds the > > listener function: > > > > > > v8::Local<v8::Function> handlerFunction = > getListenerFunction(scriptState); > > > > > > The question I have is, how could I print out the function address of > the > > listener function, or other "ID" that can be used to identify the > > java-script function? > > handlerFunction->GetIdentityHash(), although the hash need not be unique. > > You can print the function object's raw address with `* (void**) > *handlerFunction` but it's fairly pointless because it's not stable > over time, the garbage collector moves it around. > -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
