Commit c780b01e authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Fix Rosetta callback

The completion callback for Rosetta installation has an NSError*
parameter.

Fixed: 1150273
Change-Id: I2e07537d1973005dd2322748a57b24bad43df973
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2546474
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828673}
parent 0451d6f3
...@@ -97,7 +97,7 @@ void RequestRosettaInstallation( ...@@ -97,7 +97,7 @@ void RequestRosettaInstallation(
// - (void)[OAHSoftwareUpdateController // - (void)[OAHSoftwareUpdateController
// startUpdateWithOptions:(NSDictionary*)options // startUpdateWithOptions:(NSDictionary*)options
// withHostWindow:(NSWindow*)window // withHostWindow:(NSWindow*)window
// completion:(void (^)(BOOL))block] // completion:(void (^)(BOOL, NSError*))block]
SEL selector = @selector(startUpdateWithOptions:withHostWindow:completion:); SEL selector = @selector(startUpdateWithOptions:withHostWindow:completion:);
scoped_nsobject<NSObject> controller( scoped_nsobject<NSObject> controller(
...@@ -137,7 +137,7 @@ void RequestRosettaInstallation( ...@@ -137,7 +137,7 @@ void RequestRosettaInstallation(
__block OnceCallback<void(RosettaInstallationResult)> block_callback = __block OnceCallback<void(RosettaInstallationResult)> block_callback =
std::move(callback); std::move(callback);
auto completion = ^(BOOL success) { auto completion = ^(BOOL success, NSError* error) {
// There _should_ be a valid callback and current_rosetta_installation // There _should_ be a valid callback and current_rosetta_installation
// here. However, crashes indicate that sometimes // here. However, crashes indicate that sometimes
// OAHSoftwareUpdateController performs a double-callback of the block. // OAHSoftwareUpdateController performs a double-callback of the block.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment