From 864db71f6b375447e890bd3d0e9f8c2c110a18f2 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 8 Dec 2015 12:59:24 -0500 Subject: [PATCH] Mac: Fix Xcode 7 (10.11 SDK) build errors (issue #1732) --- libcef/browser/native/javascript_dialog_runner_mac.mm | 8 ++++++-- tests/cefclient/browser/browser_window_osr_mac.mm | 6 +++++- tests/cefclient/renderer/performance_test.cc | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/libcef/browser/native/javascript_dialog_runner_mac.mm b/libcef/browser/native/javascript_dialog_runner_mac.mm index 851fedce0..815c9c501 100644 --- a/libcef/browser/native/javascript_dialog_runner_mac.mm +++ b/libcef/browser/native/javascript_dialog_runner_mac.mm @@ -140,8 +140,13 @@ void CefJavaScriptDialogRunnerMac::Run( [other setKeyEquivalent:@"\e"]; } + // Calling beginSheetModalForWindow:nil is wrong API usage. For now work + // around the "callee requires a non-null argument" error that occurs when + // building with the 10.11 SDK. See http://crbug.com/383820 for related + // discussion. + id nilArg = nil; [alert - beginSheetModalForWindow:nil // nil here makes it app-modal + beginSheetModalForWindow:nilArg // nil here makes it app-modal modalDelegate:helper_ didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:this]; @@ -163,4 +168,3 @@ void CefJavaScriptDialogRunnerMac::DialogClosed( helper_.reset(nil); callback_.Run(success, user_input); } - diff --git a/tests/cefclient/browser/browser_window_osr_mac.mm b/tests/cefclient/browser/browser_window_osr_mac.mm index ede00f2c6..3a9162945 100644 --- a/tests/cefclient/browser/browser_window_osr_mac.mm +++ b/tests/cefclient/browser/browser_window_osr_mac.mm @@ -772,7 +772,11 @@ BrowserOpenGLView* GLView(NSView* view) { clickCount:1 pressure:1.0]; - [window dragImage:nil + // TODO(cef): Pass a non-nil value to dragImage (see issue #1715). For now + // work around the "callee requires a non-null argument" error that occurs + // when building with the 10.11 SDK. + id nilArg = nil; + [window dragImage:nilArg at:position offset:NSZeroSize event:dragEvent diff --git a/tests/cefclient/renderer/performance_test.cc b/tests/cefclient/renderer/performance_test.cc index 37f19901e..375d16f1f 100644 --- a/tests/cefclient/renderer/performance_test.cc +++ b/tests/cefclient/renderer/performance_test.cc @@ -35,7 +35,7 @@ class V8Handler : public CefV8Handler { CefRefPtr object, const CefV8ValueList& arguments, CefRefPtr& retval, - CefString& exception) { + CefString& exception) OVERRIDE { if (name == kRunPerfTest) { if (arguments.size() == 1 && arguments[0]->IsString()) { // Run the specified perf test.