Mac: Fix Xcode 7 (10.11 SDK) build errors (issue #1732)

This commit is contained in:
Marshall Greenblatt 2015-12-08 12:59:24 -05:00
parent 626fc561ca
commit 864db71f6b
3 changed files with 12 additions and 4 deletions

View File

@ -140,8 +140,13 @@ void CefJavaScriptDialogRunnerMac::Run(
[other setKeyEquivalent:@"\e"]; [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 [alert
beginSheetModalForWindow:nil // nil here makes it app-modal beginSheetModalForWindow:nilArg // nil here makes it app-modal
modalDelegate:helper_ modalDelegate:helper_
didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:)
contextInfo:this]; contextInfo:this];
@ -163,4 +168,3 @@ void CefJavaScriptDialogRunnerMac::DialogClosed(
helper_.reset(nil); helper_.reset(nil);
callback_.Run(success, user_input); callback_.Run(success, user_input);
} }

View File

@ -772,7 +772,11 @@ BrowserOpenGLView* GLView(NSView* view) {
clickCount:1 clickCount:1
pressure:1.0]; 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 at:position
offset:NSZeroSize offset:NSZeroSize
event:dragEvent event:dragEvent

View File

@ -35,7 +35,7 @@ class V8Handler : public CefV8Handler {
CefRefPtr<CefV8Value> object, CefRefPtr<CefV8Value> object,
const CefV8ValueList& arguments, const CefV8ValueList& arguments,
CefRefPtr<CefV8Value>& retval, CefRefPtr<CefV8Value>& retval,
CefString& exception) { CefString& exception) OVERRIDE {
if (name == kRunPerfTest) { if (name == kRunPerfTest) {
if (arguments.size() == 1 && arguments[0]->IsString()) { if (arguments.size() == 1 && arguments[0]->IsString()) {
// Run the specified perf test. // Run the specified perf test.