Refactor NativeWindow (Part 6): Move NativeWindow bindings to api::TopLevelWindow (#12596)
* Add atom::api::TopLevelWindow * Make BrowserWindow inherit TopLevelWindow * Fix reading from wrong weak map * Read options after setting content view * OnWindowClosed is not guarenteed to run now * Fix the offscreen hack in BrowserWindow * Fix building on Linux * Fix tests on Linux * Fix building on Windows
This commit is contained in:
parent
23bb3bd963
commit
858828d343
10 changed files with 1406 additions and 1256 deletions
|
@ -107,7 +107,9 @@ class TrackableObject : public TrackableObjectBase,
|
|||
}
|
||||
|
||||
protected:
|
||||
TrackableObject() {}
|
||||
TrackableObject() {
|
||||
weak_map_id_ = ++next_id_;
|
||||
}
|
||||
|
||||
~TrackableObject() override {
|
||||
RemoveFromWeakMap();
|
||||
|
@ -118,7 +120,6 @@ class TrackableObject : public TrackableObjectBase,
|
|||
if (!weak_map_) {
|
||||
weak_map_ = new atom::KeyWeakMap<int32_t>;
|
||||
}
|
||||
weak_map_id_ = ++next_id_;
|
||||
weak_map_->Set(isolate, weak_map_id_, wrapper);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue