use webcontents id to identify callbacks
This commit is contained in:
parent
3a154ab8ea
commit
2c59f4567e
6 changed files with 25 additions and 21 deletions
|
@ -19,12 +19,12 @@ class IDWeakMap {
|
|||
IDWeakMap();
|
||||
~IDWeakMap();
|
||||
|
||||
// Adds |object| to WeakMap and returns its allocated |id|.
|
||||
int32_t Add(v8::Isolate* isolate, v8::Local<v8::Object> object);
|
||||
|
||||
// Sets the object to WeakMap with the given |id|.
|
||||
void Set(v8::Isolate* isolate, int32_t id, v8::Local<v8::Object> object);
|
||||
|
||||
// Adds |object| to WeakMap and returns its allocated |id|.
|
||||
int32_t Add(v8::Isolate* isolate, v8::Local<v8::Object> object);
|
||||
|
||||
// Gets the object from WeakMap by its |id|.
|
||||
v8::MaybeLocal<v8::Object> Get(v8::Isolate* isolate, int32_t id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue