mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
mac: 10.11 SDK compatibility
This doesn’t really provide compatibility, it just ignores the deprecation warning for +[NSURLConnection sendSynchronousRequest:returningResponse:error:]. The suggested replacement, NSURLSession, was new in 10.9, and this code needs to run on 10.6, so it’s not usable here, at least not without a runtime check. BUG=crashpad:65 R=rsesek@chromium.org Review URL: https://codereview.chromium.org/1395673002 .
This commit is contained in:
parent
d3bdb23ffe
commit
9fdb70738b
@ -181,9 +181,15 @@ bool HTTPTransportMac::ExecuteSynchronously(std::string* response_body) {
|
||||
|
||||
NSURLResponse* response = nil;
|
||||
NSError* error = nil;
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
// Deprecated in OS X 10.11. The suggested replacement, NSURLSession, is
|
||||
// only available on 10.9 and later, and this needs to run on earlier
|
||||
// releases.
|
||||
NSData* body = [NSURLConnection sendSynchronousRequest:request
|
||||
returningResponse:&response
|
||||
error:&error];
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
if (error) {
|
||||
LOG(ERROR) << [[error localizedDescription] UTF8String] << " ("
|
||||
|
Loading…
x
Reference in New Issue
Block a user