chore: bump chromium to 117.0.5923.0 (main) (#39304)

* chore: bump chromium in DEPS to 117.0.5921.0

* chore: update chromium patches

* 4721409: Remove redundant ARC configuration in /components | 4721409

* 4643750: Add V8_LOW_PRIORITY_TQ for main thread | 4643750

* 4022621: Re-register status item when owner of status watcher is changed | 4022621

* chore: update V8/boringssl patches

* fixup! 4643750: Add V8_LOW_PRIORITY_TQ for main thread | 4643750

* chore: bump chromium in DEPS to 117.0.5923.0

* build [debug]: remove assert
4722125: Update enterprise content analysis buildflags usage | 4722125

* chore: manually rollback to 117.0.5921.0

* build [arc]: ARC conversion in auto_updater

* build [arc]: ARC conversion in browser/api

* build [arc]: ARC conversion in notifications/mac

* build [arc]: ARC conversion in in_app_purchase

* build [arc]: ARC conversion in browser/ui

* build [arc]: ARC conversion in ui/cocoa

* build [arc]: ARC conversion in shell/common

* build [arc]: ARC conversion in OSR

* build [arc]: ARC conversion in login_helper

* build [arc]: ARC conversion in app_mas

* build [arc]: fix up ARC syntax (thanks @codebytere!)

* 4726946: [Extensions] Work around dangling BrowserContext pointer. | 4726946

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
This commit is contained in:
electron-roller[bot] 2023-08-04 10:47:29 +02:00 committed by GitHub
parent 6d0e8044eb
commit c5b9f766f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 323 additions and 399 deletions

View file

@ -15,7 +15,6 @@ namespace electron::api {
// Callback passed to js which will stop accessing the given bookmark.
void OnStopAccessingSecurityScopedResource(NSURL* bookmarkUrl) {
[bookmarkUrl stopAccessingSecurityScopedResource];
[bookmarkUrl release];
}
// Get base64 encoded NSData, create a bookmark for it and start accessing it.
@ -54,9 +53,6 @@ base::RepeatingCallback<void()> App::StartAccessingSecurityScopedResource(
[bookmarkUrl startAccessingSecurityScopedResource];
}
// Stop the NSURL from being GC'd.
[bookmarkUrl retain];
// Return a js callback which will close the bookmark.
return base::BindRepeating(&OnStopAccessingSecurityScopedResource,
bookmarkUrl);

View file

@ -63,7 +63,6 @@
- (void)dealloc {
[[NSDistributedNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
- (void)addEmitter:(electron::api::PowerMonitor*)monitor_ {

View file

@ -25,7 +25,7 @@ namespace auto_updater {
namespace {
// The global SQRLUpdater object.
SQRLUpdater* g_updater = nil;
SQRLUpdater* __strong g_updater = nil;
} // namespace
@ -87,7 +87,7 @@ void AutoUpdater::SetFeedURL(gin::Arguments* args) {
}
if (g_updater)
[g_updater release];
g_updater = nil;
// Initialize the SQRLUpdater.
@try {

View file

@ -97,7 +97,7 @@ gin::IsolateHolder CreateIsolateHolder(v8::Isolate* isolate) {
base::SingleThreadTaskRunner::GetCurrentDefault(),
gin::IsolateHolder::kSingleThread,
gin::IsolateHolder::IsolateType::kUtility, std::move(create_params),
gin::IsolateHolder::IsolateCreationMode::kNormal, isolate);
gin::IsolateHolder::IsolateCreationMode::kNormal, nullptr, isolate);
}
} // namespace

View file

@ -84,9 +84,6 @@
*/
- (void)productsRequest:(SKProductsRequest*)request
didReceiveResponse:(SKProductsResponse*)response {
// Release request object.
[request release];
// Get the first product.
NSArray* products = response.products;
SKProduct* product = [products count] == 1 ? [products firstObject] : nil;
@ -129,13 +126,10 @@
content::GetUIThreadTaskRunner({})->PostTask(
FROM_HERE, base::BindOnce(std::move(callback_), isProductValid));
}
// Release this delegate.
[self release];
}
- (void)dealloc {
[username_ release];
[super dealloc];
username_ = nil;
}
@end

View file

@ -57,7 +57,6 @@ using InAppTransactionCallback = base::RepeatingCallback<void(
*/
- (void)dealloc {
[[SKPaymentQueue defaultQueue] removeTransactionObserver:self];
[super dealloc];
}
/**
@ -226,7 +225,7 @@ TransactionObserver::TransactionObserver() {
}
TransactionObserver::~TransactionObserver() {
[observer_ release];
observer_ = nil;
}
} // namespace in_app_purchase

View file

@ -67,9 +67,6 @@
*/
- (void)productsRequest:(SKProductsRequest*)request
didReceiveResponse:(SKProductsResponse*)response {
// Release request object.
[request release];
// Get the products.
NSArray* products = response.products;
@ -84,8 +81,6 @@
// Send the callback to the browser thread.
content::GetUIThreadTaskRunner({})->PostTask(
FROM_HERE, base::BindOnce(std::move(callback_), converted));
[self release];
}
/**

View file

@ -10,7 +10,6 @@
#include <map>
#include <string>
#include "base/mac/scoped_nsobject.h"
#include "shell/browser/notifications/notification.h"
namespace electron {
@ -36,7 +35,7 @@ class CocoaNotification : public Notification {
private:
void LogAction(const char* action);
base::scoped_nsobject<NSUserNotification> notification_;
NSUserNotification* __strong notification_;
std::map<std::string, unsigned> additional_action_indices_;
unsigned action_index_;
};

View file

@ -28,7 +28,7 @@ CocoaNotification::~CocoaNotification() {
}
void CocoaNotification::Show(const NotificationOptions& options) {
notification_.reset([[NSUserNotification alloc] init]);
notification_ = [[NSUserNotification alloc] init];
NSString* identifier =
[NSString stringWithFormat:@"%@:notification:%@",
@ -71,8 +71,7 @@ void CocoaNotification::Show(const NotificationOptions& options) {
int i = 0;
action_index_ = UINT_MAX;
NSMutableArray* additionalActions =
[[[NSMutableArray alloc] init] autorelease];
NSMutableArray* additionalActions = [[NSMutableArray alloc] init];
for (const auto& action : options.actions) {
if (action.type == u"button") {
// If the notification has both a reply and actions,
@ -118,7 +117,7 @@ void CocoaNotification::Dismiss() {
NotificationDismissed();
notification_.reset(nil);
notification_ = nil;
}
void CocoaNotification::NotificationDisplayed() {

View file

@ -6,7 +6,6 @@
#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_
#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_
#include "base/mac/scoped_nsobject.h"
#include "shell/browser/notifications/mac/notification_center_delegate.h"
#include "shell/browser/notifications/notification_presenter.h"
@ -25,8 +24,7 @@ class NotificationPresenterMac : public NotificationPresenter {
Notification* CreateNotificationObject(
NotificationDelegate* delegate) override;
base::scoped_nsobject<NotificationCenterDelegate>
notification_center_delegate_;
NotificationCenterDelegate* __strong notification_center_delegate_;
};
} // namespace electron

View file

@ -14,14 +14,13 @@
- (void)drawRect:(NSRect)dirtyRect {
NSString* str = @"No content under offscreen mode";
NSMutableParagraphStyle* paragraphStyle =
[[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease];
[[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[paragraphStyle setAlignment:NSTextAlignmentCenter];
NSDictionary* attributes =
[NSDictionary dictionaryWithObject:paragraphStyle
forKey:NSParagraphStyleAttributeName];
NSAttributedString* text =
[[[NSAttributedString alloc] initWithString:str
attributes:attributes] autorelease];
[[NSAttributedString alloc] initWithString:str attributes:attributes];
NSRect frame = NSMakeRect(0, (self.frame.size.height - text.size.height) / 2,
self.frame.size.width, text.size.height);
[str drawInRect:frame withAttributes:attributes];
@ -48,7 +47,7 @@ void OffScreenWebContentsView::PlatformCreate() {
}
void OffScreenWebContentsView::PlatformDestroy() {
[offScreenView_ release];
offScreenView_ = nil;
}
} // namespace electron

View file

@ -42,12 +42,9 @@
@implementation TrustDelegate
- (void)dealloc {
[panel_ release];
CFRelease(trust_);
CFRelease(cert_chain_);
CFRelease(sec_policy_);
[super dealloc];
}
- (id)initWithPromise:(gin_helper::Promise<void>)promise
@ -77,7 +74,6 @@
cert_db->NotifyObserversTrustStoreChanged();
promise_->Resolve();
[self autorelease];
}
@end

View file

@ -6,7 +6,6 @@
#import <Cocoa/Cocoa.h>
#include "base/mac/scoped_nsobject.h"
#include "content/public/common/color_parser.h"
#include "shell/browser/ui/cocoa/NSString+ANSI.h"
#include "skia/ext/skia_utils_mac.h"
@ -149,12 +148,11 @@
- (NSMutableAttributedString*)attributedStringParsingANSICodes {
NSMutableAttributedString* result = [[NSMutableAttributedString alloc] init];
base::scoped_nsobject<NSMutableDictionary> attributes(
[[NSMutableDictionary alloc] init]);
NSMutableDictionary* attributes([[NSMutableDictionary alloc] init]);
NSArray* parts = [self componentsSeparatedByString:@"\033["];
[result appendAttributedString:[[[NSAttributedString alloc]
[result appendAttributedString:[[NSAttributedString alloc]
initWithString:parts.firstObject
attributes:nil] autorelease]];
attributes:nil]];
for (NSString* part in
[parts subarrayWithRange:NSMakeRange(1, parts.count - 1)]) {
@ -165,18 +163,16 @@
NSString* text = sequence.lastObject;
if (sequence.count < 2) {
[result
appendAttributedString:[[[NSAttributedString alloc]
initWithString:text
attributes:attributes] autorelease]];
[result appendAttributedString:[[NSAttributedString alloc]
initWithString:text
attributes:attributes]];
} else if (sequence.count >= 2) {
text = [[sequence subarrayWithRange:NSMakeRange(1, sequence.count - 1)]
componentsJoinedByString:@"m"];
[attributes modifyAttributesForANSICodes:sequence[0]];
[result
appendAttributedString:[[[NSAttributedString alloc]
initWithString:text
attributes:attributes] autorelease]];
[result appendAttributedString:[[NSAttributedString alloc]
initWithString:text
attributes:attributes]];
}
}

View file

@ -50,7 +50,7 @@ NSString* ContainingDiskImageDevice(NSString* bundlePath) {
stringWithFileSystemRepresentation:fs.f_mntfromname
length:strlen(fs.f_mntfromname)];
NSTask* hdiutil = [[[NSTask alloc] init] autorelease];
NSTask* hdiutil = [[NSTask alloc] init];
[hdiutil setLaunchPath:@"/usr/bin/hdiutil"];
[hdiutil setArguments:[NSArray arrayWithObjects:@"info", @"-plist", nil]];
[hdiutil setStandardOutput:[NSPipe pipe]];
@ -286,8 +286,8 @@ tell application "Finder"
move theFile to trash
end tell
)str";
NSAppleScript* appleScript = [[[NSAppleScript alloc]
initWithSource:[NSString stringWithFormat:@(code), path]] autorelease];
NSAppleScript* appleScript = [[NSAppleScript alloc]
initWithSource:[NSString stringWithFormat:@(code), path]];
NSDictionary* errorDict = nil;
NSAppleEventDescriptor* scriptResult =
[appleScript executeAndReturnError:&errorDict];

View file

@ -26,11 +26,10 @@ ElectronNativeWidgetMac::~ElectronNativeWidgetMac() = default;
NativeWidgetMacNSWindow* ElectronNativeWidgetMac::CreateNSWindow(
const remote_cocoa::mojom::CreateWindowParams* params) {
if (window_type_ == "panel") {
return [[[ElectronNSPanel alloc] initWithShell:shell_
styleMask:style_mask_] autorelease];
return [[ElectronNSPanel alloc] initWithShell:shell_ styleMask:style_mask_];
} else {
return [[[ElectronNSWindow alloc] initWithShell:shell_
styleMask:style_mask_] autorelease];
return [[ElectronNSWindow alloc] initWithShell:shell_
styleMask:style_mask_];
}
}

View file

@ -45,7 +45,6 @@
- (void)dealloc {
if (hover_view_)
[hover_view_ removeFromSuperview];
[super dealloc];
}
- (void)setVisible:(BOOL)visible {

View file

@ -54,8 +54,8 @@ void DragFileItems(const std::vector<base::FilePath>& files,
NSMutableArray* file_items = [NSMutableArray array];
for (auto const& file : files) {
NSURL* file_url = base::mac::FilePathToNSURL(file);
NSDraggingItem* file_item = [[[NSDraggingItem alloc]
initWithPasteboardWriter:file_url] autorelease];
NSDraggingItem* file_item =
[[NSDraggingItem alloc] initWithPasteboardWriter:file_url];
NSImage* file_image = icon.ToNSImage();
NSSize image_size = file_image.size;
NSRect image_rect = NSMakeRect(current_position.x - image_size.width / 2,

View file

@ -73,8 +73,7 @@
- (void)dealloc {
auto* popupButton =
static_cast<NSPopUpButton*>([[self subviews] objectAtIndex:1]);
[[popupButton target] release];
[super dealloc];
popupButton.target = nil;
}
@end
@ -148,10 +147,10 @@ void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) {
[popupButton setTarget:popUpButtonHandler];
[popupButton setAction:@selector(selectFormat:)];
[accessoryView addSubview:[label autorelease]];
[accessoryView addSubview:[popupButton autorelease]];
[accessoryView addSubview:label];
[accessoryView addSubview:popupButton];
[dialog setAccessoryView:[accessoryView autorelease]];
[dialog setAccessoryView:accessoryView];
}
void SetupDialog(NSSavePanel* dialog, const DialogSettings& settings) {

View file

@ -14,7 +14,6 @@
#include "base/containers/contains.h"
#include "base/functional/callback.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_nsobject.h"
#include "base/no_destructor.h"
#include "base/strings/sys_string_conversions.h"
#include "content/public/browser/browser_task_traits.h"
@ -106,7 +105,7 @@ NSAlert* CreateNSAlert(const MessageBoxSettings& settings) {
if (settings.text_width > 0) {
NSRect rect = NSMakeRect(0, 0, settings.text_width, 0);
NSView* accessoryView = [[NSView alloc] initWithFrame:rect];
[alert setAccessoryView:[accessoryView autorelease]];
[alert setAccessoryView:accessoryView];
}
return alert;
@ -115,7 +114,7 @@ NSAlert* CreateNSAlert(const MessageBoxSettings& settings) {
} // namespace
int ShowMessageBoxSync(const MessageBoxSettings& settings) {
base::scoped_nsobject<NSAlert> alert(CreateNSAlert(settings));
NSAlert* alert(CreateNSAlert(settings));
// Use runModal for synchronous alert without parent, since we don't have a
// window to wait for. Also use it when window is provided but it is not
@ -145,7 +144,7 @@ void ShowMessageBox(const MessageBoxSettings& settings,
// Use runModal for synchronous alert without parent, since we don't have a
// window to wait for.
if (!settings.parent_window) {
int ret = [[alert autorelease] runModal];
int ret = [alert runModal];
std::move(callback).Run(
ret, alert.suppressionButton.state == NSControlStateValueOn);
} else {
@ -175,7 +174,6 @@ void ShowMessageBox(const MessageBoxSettings& settings,
if (response < 0)
response = cancel_id;
bool suppressed = alert.suppressionButton.state == NSControlStateValueOn;
[alert release];
// The completionHandler runs inside a transaction commit, and we should
// not do any runModal inside it. However since we can not control what
// users will run in the callback, we have to delay running the callback
@ -204,7 +202,6 @@ void ShowErrorBox(const std::u16string& title, const std::u16string& content) {
[alert setInformativeText:base::SysUTF16ToNSString(content)];
[alert setAlertStyle:NSAlertStyleCritical];
[alert runModal];
[alert release];
}
} // namespace electron