fix: send NSView* as the response to getNativeWindowHandle() instead of a null handle (#15521) (#15803)

This commit is contained in:
Tom Moor 2018-11-27 18:00:37 -08:00 committed by Cheng Zhao
parent 3ed5a24c72
commit 250a09a43f
6 changed files with 22 additions and 2 deletions

View file

@ -664,8 +664,11 @@ void TopLevelWindow::SetBrowserView(v8::Local<v8::Value> value) {
}
v8::Local<v8::Value> TopLevelWindow::GetNativeWindowHandle() {
gfx::AcceleratedWidget handle = window_->GetAcceleratedWidget();
return ToBuffer(isolate(), static_cast<void*>(&handle), sizeof(handle));
// TODO(MarshallOfSound): Replace once
// https://chromium-review.googlesource.com/c/chromium/src/+/1253094/ has
// landed
auto handle = window_->GetNativeWindowHandlePointer();
return ToBuffer(isolate(), std::get<0>(handle), std::get<1>(handle));
}
void TopLevelWindow::SetProgressBar(double progress, mate::Arguments* args) {