Skip to content

Commit

Permalink
Merge branch 'hotfix/0.31.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Jan 3, 2023
2 parents 4b069a4 + 3cfa68e commit cd5c1b7
Show file tree
Hide file tree
Showing 16 changed files with 412 additions and 148 deletions.
2 changes: 1 addition & 1 deletion Configuration/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MARKETING_VERSION = 0.31.3
MARKETING_VERSION = 0.31.4

4 changes: 4 additions & 0 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@
B6DB3AF6278EA0130024C5C4 /* BundleExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6106B9D26A565DA0013B453 /* BundleExtension.swift */; };
B6DB3CF926A00E2D00D459B7 /* AVCaptureDevice+SwizzledAuthState.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6DB3CF826A00E2D00D459B7 /* AVCaptureDevice+SwizzledAuthState.swift */; };
B6DB3CFB26A17CB800D459B7 /* PermissionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6DB3CFA26A17CB800D459B7 /* PermissionModel.swift */; };
B6E319382953446000DD3BCF /* Assertions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6E319372953446000DD3BCF /* Assertions.swift */; };
B6E61EE3263AC0C8004E11AB /* FileManagerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6E61EE2263AC0C8004E11AB /* FileManagerExtension.swift */; };
B6E61EE8263ACE16004E11AB /* UTType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6E61EE7263ACE16004E11AB /* UTType.swift */; };
B6F1C80B2761C45400334924 /* LocalUnprotectedDomains.swift in Sources */ = {isa = PBXBuildFile; fileRef = 336B39E22726B4B700C417D3 /* LocalUnprotectedDomains.swift */; };
Expand Down Expand Up @@ -1699,6 +1700,7 @@
B6DB3AEE278D5C370024C5C4 /* URLSessionExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionExtension.swift; sourceTree = "<group>"; };
B6DB3CF826A00E2D00D459B7 /* AVCaptureDevice+SwizzledAuthState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AVCaptureDevice+SwizzledAuthState.swift"; sourceTree = "<group>"; };
B6DB3CFA26A17CB800D459B7 /* PermissionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionModel.swift; sourceTree = "<group>"; };
B6E319372953446000DD3BCF /* Assertions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Assertions.swift; sourceTree = "<group>"; };
B6E61EE2263AC0C8004E11AB /* FileManagerExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileManagerExtension.swift; sourceTree = "<group>"; };
B6E61EE7263ACE16004E11AB /* UTType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UTType.swift; sourceTree = "<group>"; };
B6F41030264D2B23003DA42C /* ProgressExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressExtension.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2493,6 +2495,7 @@
4BB88B4E25B7BA20006F6B06 /* Utilities */ = {
isa = PBXGroup;
children = (
B6E319372953446000DD3BCF /* Assertions.swift */,
4BB88B5A25B7BA50006F6B06 /* Instruments.swift */,
4BB88B4F25B7BA2B006F6B06 /* TabInstrumentation.swift */,
85C6A29525CC1FFD00EEB5F1 /* UserDefaultsWrapper.swift */,
Expand Down Expand Up @@ -5208,6 +5211,7 @@
85AC3AEF25D5CE9800C7D2AA /* UserScripts.swift in Sources */,
B643BF1427ABF772000BACEC /* NSWorkspaceExtension.swift in Sources */,
4B677439255DBEB800025BD8 /* AppHTTPSUpgradeStore.swift in Sources */,
B6E319382953446000DD3BCF /* Assertions.swift in Sources */,
AAB549DF25DAB8F80058460B /* BookmarkViewModel.swift in Sources */,
85707F28276A34D900DC0649 /* DaxSpeech.swift in Sources */,
31F28C5328C8EECA00119F70 /* PrivatePlayerSchemeHandler.swift in Sources */,
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGo/Browser Tab/Model/Tab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ final class Tab: NSObject, Identifiable, ObservableObject {
didSet {
guard let request = userInteractionDialog?.request else { return }
request.addCompletionHandler { [weak self, weak request] _ in
if self?.userInteractionDialog?.request === request {
self?.userInteractionDialog = nil
if let self, let request, self.userInteractionDialog?.request === request {
self.userInteractionDialog = nil
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion DuckDuckGo/Browser Tab/Model/UserDialogRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ final class UserDialogRequest<Info, Output>: UserDialogRequestProtocol {
}

deinit {
callback?(.failure(.deinitialized))
guard let callback else { return }

DispatchQueue.main.async {
callback(.failure(.deinitialized))
}
}

}
Expand Down
31 changes: 31 additions & 0 deletions DuckDuckGo/Common/Utilities/Assertions.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// Assertions.swift
//
// Copyright © 2022 DuckDuckGo. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

import Foundation

#if DEBUG
public var customAssertionFailure: ((@autoclosure () -> String, StaticString, UInt) -> Void)?
public func assertionFailure(_ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) {
customAssertionFailure?(message(), file, line) ?? Swift.assertionFailure(message(), file: file, line: line)
}

public var customAssert: ((@autoclosure () -> Bool, @autoclosure () -> String, StaticString, UInt) -> Void)?
public func assert(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) {
customAssert?(condition(), message(), file, line) ?? Swift.assert(condition(), message(), file: file, line: line)
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import BrowserServicesKit
final class AppPrivacyConfigurationDataProvider: EmbeddedDataProvider {

public struct Constants {
public static let embeddedDataETag = "\"ac8c936d8dedab3ef9ab637e712f0b2e\""
public static let embeddedDataSHA = "223cbdc4ee1cb95031866149eed6f8298c1e02c9ba46b2b22676feae7380cfb5"
public static let embeddedDataETag = "\"4799b1d0bde3b1c4aa23d675b8f7fc2f\""
public static let embeddedDataSHA = "c8642092e80a136aae7763d34f321af771ddb69277030c8d00d8eb8c2a5bd0cc"
}

var embeddedDataEtag: String {
Expand Down
Loading

0 comments on commit cd5c1b7

Please sign in to comment.