On Sun, Feb 26, 2017 at 8:50 PM, <hy...@umich.edu> wrote: > 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.
Is there a reason you sent this to v8-dev instead of v8-users like your previous message? I've taken the liberty of moving v8-dev to BCC. To answer your question: you can use a->StrictEquals(b) or a->SameValue(b). If you are looking for a unique value that you can use as a key in a set or map, you're out of luck: functions have identity but not (partial or total) ordering. You can of course store them in a hash map and use a mix of GetIdentityHash() and SameValue() to retrieve them in (on average) better than linear time. -- -- v8-dev mailing list v8-dev@googlegroups.com 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 v8-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.