fix: BrowserWindow.fromWebContents should work in browser-window-created (#33257)
This commit is contained in:
parent
b2c5623a13
commit
e904486076
2 changed files with 13 additions and 1 deletions
|
@ -117,11 +117,11 @@ class TrackableObject : public TrackableObjectBase, public EventEmitter<T> {
|
|||
~TrackableObject() override { RemoveFromWeakMap(); }
|
||||
|
||||
void InitWith(v8::Isolate* isolate, v8::Local<v8::Object> wrapper) override {
|
||||
gin_helper::WrappableBase::InitWith(isolate, wrapper);
|
||||
if (!weak_map_) {
|
||||
weak_map_ = new electron::KeyWeakMap<int32_t>;
|
||||
}
|
||||
weak_map_->Set(isolate, weak_map_id_, wrapper);
|
||||
gin_helper::WrappableBase::InitWith(isolate, wrapper);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue