refactor: NativeWindow::Create() returns a unique_ptr (#43608)

refactor: NativeWindow::Create() returns a unique_ptr

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-09-06 15:26:09 -05:00 committed by GitHub
parent 178d937062
commit 01f367a344
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 10 deletions

View file

@ -96,8 +96,8 @@ BaseWindow::BaseWindow(v8::Isolate* isolate,
}
// Creates NativeWindow.
window_.reset(NativeWindow::Create(
options, parent.IsEmpty() ? nullptr : parent->window_.get()));
window_ = NativeWindow::Create(
options, parent.IsEmpty() ? nullptr : parent->window_.get());
window_->AddObserver(this);
SetContentView(View::Create(isolate));