Fix linux and mac build errors
This commit is contained in:
parent
224955d6ac
commit
943e46f3bd
2 changed files with 4 additions and 4 deletions
|
@ -107,7 +107,6 @@ void TranslateOldOptions(v8::Isolate* isolate, v8::Local<v8::Object> options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
|
||||||
// Converts binary data to Buffer.
|
// Converts binary data to Buffer.
|
||||||
v8::Local<v8::Value> ToBuffer(v8::Isolate* isolate, void* val, int size) {
|
v8::Local<v8::Value> ToBuffer(v8::Isolate* isolate, void* val, int size) {
|
||||||
auto buffer = node::Buffer::New(isolate, static_cast<char*>(val), size);
|
auto buffer = node::Buffer::New(isolate, static_cast<char*>(val), size);
|
||||||
|
@ -116,7 +115,6 @@ v8::Local<v8::Value> ToBuffer(v8::Isolate* isolate, void* val, int size) {
|
||||||
else
|
else
|
||||||
return buffer.ToLocalChecked();
|
return buffer.ToLocalChecked();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
@ -596,7 +594,9 @@ void Window::SetAspectRatio(double aspect_ratio, mate::Arguments* args) {
|
||||||
|
|
||||||
v8::Local<v8::Value> Window::GetNativeWindowHandle() {
|
v8::Local<v8::Value> Window::GetNativeWindowHandle() {
|
||||||
gfx::AcceleratedWidget handle = window_->GetAcceleratedWidget();
|
gfx::AcceleratedWidget handle = window_->GetAcceleratedWidget();
|
||||||
return ToBuffer(isolate(), static_cast<void*>(&handle), sizeof(gfx::AcceleratedWidget));
|
return ToBuffer(isolate(),
|
||||||
|
static_cast<void*>(&handle),
|
||||||
|
sizeof(gfx::AcceleratedWidget));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::SetVisibleOnAllWorkspaces(bool visible) {
|
void Window::SetVisibleOnAllWorkspaces(bool visible) {
|
||||||
|
|
|
@ -732,7 +732,7 @@ gfx::NativeWindow NativeWindowMac::GetNativeWindow() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::AcceleratedWidget NativeWindowMac::GetAcceleratedWidget() {
|
gfx::AcceleratedWidget NativeWindowMac::GetAcceleratedWidget() {
|
||||||
return window_;
|
return inspectable_web_contents()->GetView()->GetNativeView();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::SetProgressBar(double progress) {
|
void NativeWindowMac::SetProgressBar(double progress) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue