Diff
Modified: trunk/Source/WebCore/ChangeLog (223899 => 223900)
--- trunk/Source/WebCore/ChangeLog 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebCore/ChangeLog 2017-10-24 18:14:03 UTC (rev 223900)
@@ -1,3 +1,15 @@
+2017-10-24 Matt Lewis <[email protected]>
+
+ Unreviewed, rolling out r223889.
+
+ This caused multiple crashes on all platforms
+
+ Reverted changeset:
+
+ "Adopt new secure coding APIs"
+ https://bugs.webkit.org/show_bug.cgi?id=178484
+ https://trac.webkit.org/changeset/223889
+
2017-10-24 Antti Koivisto <[email protected]>
Create inline wrappers for before/after pseudo elements that have display:contents
Modified: trunk/Source/WebCore/PAL/ChangeLog (223899 => 223900)
--- trunk/Source/WebCore/PAL/ChangeLog 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebCore/PAL/ChangeLog 2017-10-24 18:14:03 UTC (rev 223900)
@@ -1,3 +1,15 @@
+2017-10-24 Matt Lewis <[email protected]>
+
+ Unreviewed, rolling out r223889.
+
+ This caused multiple crashes on all platforms
+
+ Reverted changeset:
+
+ "Adopt new secure coding APIs"
+ https://bugs.webkit.org/show_bug.cgi?id=178484
+ https://trac.webkit.org/changeset/223889
+
2017-10-24 Brent Fulgham <[email protected]>
Adopt new secure coding APIs
Modified: trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj (223899 => 223900)
--- trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj 2017-10-24 18:14:03 UTC (rev 223900)
@@ -108,7 +108,6 @@
1C4876D81F8D7F4E00CCEEBD /* Logging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C4876D61F8D7F4E00CCEEBD /* Logging.cpp */; };
1C4876D91F8D7F4E00CCEEBD /* Logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C4876D71F8D7F4E00CCEEBD /* Logging.h */; };
1C4876E01F8D837500CCEEBD /* LoggingCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C4876DF1F8D837500CCEEBD /* LoggingCocoa.mm */; };
- 7A1656441F97B2B900BA3CE4 /* NSKeyedArchiverSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A1656431F97B2B800BA3CE4 /* NSKeyedArchiverSPI.h */; };
A10265871F56746100B4C844 /* FoundationSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A10265861F56746100B4C844 /* FoundationSPI.h */; };
A10265891F56747A00B4C844 /* HIToolboxSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A10265881F56747A00B4C844 /* HIToolboxSPI.h */; };
A102658B1F56748C00B4C844 /* QuickDrawSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A102658A1F56748C00B4C844 /* QuickDrawSPI.h */; };
@@ -250,7 +249,6 @@
1C4876DF1F8D837500CCEEBD /* LoggingCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LoggingCocoa.mm; sourceTree = "<group>"; };
1C67CEA11E32EDA800F80F2E /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; };
1C67CEA21E32EE2600F80F2E /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
- 7A1656431F97B2B800BA3CE4 /* NSKeyedArchiverSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSKeyedArchiverSPI.h; sourceTree = "<group>"; };
A10265861F56746100B4C844 /* FoundationSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoundationSPI.h; sourceTree = "<group>"; };
A10265881F56747A00B4C844 /* HIToolboxSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HIToolboxSPI.h; sourceTree = "<group>"; };
A102658A1F56748C00B4C844 /* QuickDrawSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuickDrawSPI.h; sourceTree = "<group>"; };
@@ -364,7 +362,6 @@
0C2DA1311F3BEB4900DBC317 /* NSColorSPI.h */,
0C2DA1321F3BEB4900DBC317 /* NSExtensionSPI.h */,
0C2DA1331F3BEB4900DBC317 /* NSFileManagerSPI.h */,
- 7A1656431F97B2B800BA3CE4 /* NSKeyedArchiverSPI.h */,
0C2DA1341F3BEB4900DBC317 /* NSStringSPI.h */,
0C2DA1351F3BEB4900DBC317 /* NSTouchBarSPI.h */,
0C2DA1361F3BEB4900DBC317 /* NSURLConnectionSPI.h */,
@@ -653,7 +650,6 @@
0C7785901F45130F00F4EBB6 /* NSFontSPI.h in Headers */,
A10826FE1F58A433004772AC /* NSGraphicsSPI.h in Headers */,
0C7785911F45130F00F4EBB6 /* NSImmediateActionGestureRecognizerSPI.h in Headers */,
- 7A1656441F97B2B900BA3CE4 /* NSKeyedArchiverSPI.h in Headers */,
0C7785921F45130F00F4EBB6 /* NSMenuSPI.h in Headers */,
0C7785931F45130F00F4EBB6 /* NSPasteboardSPI.h in Headers */,
0C7785941F45130F00F4EBB6 /* NSPopoverSPI.h in Headers */,
Deleted: trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h (223899 => 223900)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h 2017-10-24 18:14:03 UTC (rev 223900)
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#define USE_NEW_ARCHIVER_API ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110200) || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 40200) || (PLATFORM(TVOS) && __TV_OS_VERSION_MIN_REQUIRED >= 110200))
-
-#if USE(APPLE_INTERNAL_SDK) && USE(NEW_ARCHIVER_API)
-
-#import <Foundation/NSKeyedArchiver_Private.h>
-
-#else
-
-#import <Availability.h>
-#import <Foundation/NSCoder.h>
-#import <Foundation/NSKeyedArchiver.h>
-#import <wtf/Assertions.h>
-
-#if USE(NEW_ARCHIVER_API)
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface NSKeyedArchiver (NSKeyedArchiverSecureCodingInitializers)
-- (instancetype)initRequiringSecureCoding:(BOOL)requiresSecureCoding API_AVAILABLE(macos(10.13), ios(11.0));
-+ (nullable NSData *)archivedDataWithRootObject:(id)object requiringSecureCoding:(BOOL)requiresSecureCoding error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0));
-@end
-
-@interface NSKeyedUnarchiver (NSKeyedUnarchiverSecureCodingInitializer)
-- (nullable instancetype)initForReadingFromData:(NSData *)data error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0));
-+ (nullable id)unarchivedObjectOfClass:(Class)cls fromData:(NSData *)data error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0));
-+ (nullable id)unarchivedObjectOfClasses:(NSSet<Class> *)classes fromData:(NSData *)data error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0));
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif
-
-#endif
-
-#include <wtf/RetainPtr.h>
-
-inline NSData *_Nullable securelyArchivedDataWithRootObject(id _Nonnull object)
-{
-#if USE(NEW_ARCHIVER_API)
- NSError *error;
- NSData *data = "" archivedDataWithRootObject:object requiringSecureCoding:YES error:&error];
- if (!data)
- LOG_ERROR("Unable to archive data: %@", error);
- return data;
-#else
- return [NSKeyedArchiver archivedDataWithRootObject:object];
-#endif
-}
-
-inline id _Nullable securelyUnarchiveObjectOfClassFromData(Class _Nonnull cls, NSData * _Nonnull data)
-{
-#if USE(NEW_ARCHIVER_API)
- NSError *error;
- id value = [NSKeyedUnarchiver unarchivedObjectOfClass:cls fromData:data error:&error];
- if (!data)
- LOG_ERROR("Unable to unarchive data: %@", error);
- return value;
-#else
- UNUSED_PARAM(cls);
- return [NSKeyedUnarchiver unarchiveObjectWithData:data];
-#endif
-}
-
-inline RetainPtr<NSKeyedArchiver> secureArchiverFromMutableData(NSMutableData *_Nonnull mutableData)
-{
- NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:mutableData];
- [archiver setRequiresSecureCoding:YES];
- return adoptNS(archiver);
-}
-
-inline RetainPtr<NSKeyedUnarchiver> secureUnarchiverFromData(NSData *_Nonnull data)
-{
-#if USE(NEW_ARCHIVER_API)
- NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingFromData:data error:nil];
- unarchiver.decodingFailurePolicy = NSDecodingFailurePolicyRaiseException;
-#else
- NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
- [unarchiver setRequiresSecureCoding:YES];
-#endif
- return adoptNS(unarchiver);
-}
-
Modified: trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm (223899 => 223900)
--- trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -52,7 +52,6 @@
#import "WebCoreNSURLExtras.h"
#import "markup.h"
#import <pal/spi/cocoa/NSAttributedStringSPI.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <wtf/BlockObjCExceptions.h>
namespace WebCore {
@@ -142,7 +141,7 @@
if (!attributedString.length)
return nullptr;
- return SharedBuffer::create(securelyArchivedDataWithRootObject(attributedString));
+ return SharedBuffer::create([NSKeyedArchiver archivedDataWithRootObject:attributedString]);
}
String Editor::selectionInHTMLFormat()
Modified: trunk/Source/WebCore/loader/archive/cf/LegacyWebArchiveMac.mm (223899 => 223900)
--- trunk/Source/WebCore/loader/archive/cf/LegacyWebArchiveMac.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebCore/loader/archive/cf/LegacyWebArchiveMac.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -26,11 +26,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import "config.h"
-#import "LegacyWebArchive.h"
+#include "config.h"
+#include "LegacyWebArchive.h"
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
-
namespace WebCore {
static NSString * const LegacyWebArchiveResourceResponseKey = @"WebResourceResponse";
@@ -44,13 +42,14 @@
return ResourceResponse();
NSURLResponse *response = nil;
- auto unarchiver = secureUnarchiverFromData((NSData *)responseData);
+ NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)responseData];
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || PLATFORM(IOS)
+ // Because of <rdar://problem/34063313> we can't use this for decoding in older OS's.
+ [unarchiver setRequiresSecureCoding:YES];
@try {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || PLATFORM(IOS)
response = [unarchiver decodeObjectOfClass:[NSURLResponse class] forKey:LegacyWebArchiveResourceResponseKey];
#else
- // Because of <rdar://problem/34063313> we can't use secure coding for decoding in older OS's.
- [unarchiver setRequiresSecureCoding:NO];
+ @try {
id responseObject = [unarchiver decodeObjectForKey:LegacyWebArchiveResourceResponseKey];
if ([responseObject isKindOfClass:[NSURLResponse class]])
response = responseObject;
@@ -60,7 +59,8 @@
LOG_ERROR("Failed to decode NS(HTTP)URLResponse: %@", exception);
response = nil;
}
-
+ [unarchiver release];
+
return ResourceResponse(response);
}
@@ -73,7 +73,7 @@
CFMutableDataRef responseData = CFDataCreateMutable(0, 0);
- auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:(NSMutableData *)responseData]);
+ NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:(NSMutableData *)responseData];
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || PLATFORM(IOS)
// Because of <rdar://problem/34063313> we can't use this for encoding in older OS's.
[archiver setRequiresSecureCoding:YES];
@@ -80,7 +80,8 @@
#endif
[archiver encodeObject:nsResponse forKey:LegacyWebArchiveResourceResponseKey];
[archiver finishEncoding];
-
+ [archiver release];
+
return adoptCF(responseData);
}
Modified: trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm (223899 => 223900)
--- trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -36,7 +36,6 @@
#import <MobileCoreServices/MobileCoreServices.h>
#import <UIKit/UIImage.h>
#import <UIKit/UIPasteboard.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <pal/spi/ios/UIKitSPI.h>
#import <wtf/ListHashSet.h>
#import <wtf/SoftLinking.h>
@@ -265,7 +264,7 @@
[representationsToRegister addData:content.dataInWebArchiveFormat->createNSData().get() forType:WebArchivePboardType];
if (content.dataInAttributedStringFormat) {
- NSAttributedString *attributedString = securelyUnarchiveObjectOfClassFromData([NSAttributedString class], content.dataInAttributedStringFormat->createNSData().get());
+ NSAttributedString *attributedString = [NSKeyedUnarchiver unarchiveObjectWithData:content.dataInAttributedStringFormat->createNSData().get()];
if (attributedString)
[representationsToRegister addRepresentingObject:attributedString];
}
@@ -380,11 +379,11 @@
if (!provider.teamData.length)
continue;
- NSDictionary *teamDataObject = securelyUnarchiveObjectOfClassFromData([NSDictionary class], provider.teamData);
- if (!teamDataObject)
+ id teamDataObject = [NSKeyedUnarchiver unarchiveObjectWithData:provider.teamData];
+ if (!teamDataObject || ![teamDataObject isKindOfClass:[NSDictionary class]])
continue;
- id originInTeamData = [teamDataObject objectForKey:@(originKeyForTeamData)];
+ id originInTeamData = [(NSDictionary *)teamDataObject objectForKey:@(originKeyForTeamData)];
if (![originInTeamData isKindOfClass:[NSString class]])
continue;
if (String((NSString *)originInTeamData) != origin)
@@ -445,7 +444,8 @@
NSMutableArray<NSString *> *typesAsNSArray = [NSMutableArray array];
for (auto& type : data.orderedTypes)
[typesAsNSArray addObject:type];
- [representationsToRegister setTeamData:securelyArchivedDataWithRootObject(@{ @(originKeyForTeamData) : data.origin, @(customTypesKeyForTeamData) : typesAsNSArray })];
+ [representationsToRegister setTeamData:[NSKeyedArchiver archivedDataWithRootObject:@{
+ @(originKeyForTeamData) : data.origin, @(customTypesKeyForTeamData) : typesAsNSArray }]];
[representationsToRegister addData:serializedSharedBuffer.get() forType:@(PasteboardCustomData::cocoaType())];
}
}
Modified: trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.mm (223899 => 223900)
--- trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -30,7 +30,6 @@
#import <CFNetwork/CFHTTPMessage.h>
#import <CFNetwork/CFNetwork.h>
#import <pal/spi/cf/CFNetworkSPI.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <wtf/NeverDestroyed.h>
#import <wtf/RetainPtr.h>
#import <wtf/Vector.h>
@@ -41,14 +40,15 @@
static CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData)
{
+ RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)responseData]);
NSURLResponse *response;
- auto unarchiver = secureUnarchiverFromData((NSData *)responseData);
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || PLATFORM(IOS)
+ // Because of <rdar://problem/34063313> we can't use this for decoding in older OS's.
+ [unarchiver setRequiresSecureCoding:YES];
@try {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || PLATFORM(IOS)
response = [unarchiver decodeObjectOfClass:[NSURLResponse class] forKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
#else
- // Because of <rdar://problem/34063313> we can't use secure coding for decoding in older OS's.
- [unarchiver setRequiresSecureCoding:NO];
+ @try {
response = [unarchiver decodeObjectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
#endif
[unarchiver finishDecoding];
Modified: trunk/Source/WebKit/ChangeLog (223899 => 223900)
--- trunk/Source/WebKit/ChangeLog 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/ChangeLog 2017-10-24 18:14:03 UTC (rev 223900)
@@ -1,3 +1,15 @@
+2017-10-24 Matt Lewis <[email protected]>
+
+ Unreviewed, rolling out r223889.
+
+ This caused multiple crashes on all platforms
+
+ Reverted changeset:
+
+ "Adopt new secure coding APIs"
+ https://bugs.webkit.org/show_bug.cgi?id=178484
+ https://trac.webkit.org/changeset/223889
+
2017-10-24 Youenn Fablet <[email protected]>
ASSERTION FAILED: !m_serviceWorkerManager in WebProcess::getWorkerContextConnection() on API tests
Modified: trunk/Source/WebKit/Platform/ios/AccessibilityIOS.mm (223899 => 223900)
--- trunk/Source/WebKit/Platform/ios/AccessibilityIOS.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/Platform/ios/AccessibilityIOS.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -25,7 +25,6 @@
#import "config.h"
#import "AccessibilityIOS.h"
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#if PLATFORM(IOS)
@@ -35,7 +34,7 @@
{
if (!uuid)
return nil;
- return securelyArchivedDataWithRootObject(@{ @"ax-pid" : @(getpid()), @"ax-uuid" : [uuid UUIDString], @"ax-register" : @YES });
+ return [NSKeyedArchiver archivedDataWithRootObject:@{ @"ax-pid" : @(getpid()), @"ax-uuid" : [uuid UUIDString], @"ax-register" : @YES }];
}
} // namespace WebKit
Modified: trunk/Source/WebKit/Shared/Cocoa/DataDetectionResult.mm (223899 => 223900)
--- trunk/Source/WebKit/Shared/Cocoa/DataDetectionResult.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/Shared/Cocoa/DataDetectionResult.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,7 +29,6 @@
#import "ArgumentCodersCF.h"
#import "WebCoreArgumentCoders.h"
#import <pal/spi/cocoa/DataDetectorsCoreSPI.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <wtf/SoftLinking.h>
SOFT_LINK_PRIVATE_FRAMEWORK(DataDetectorsCore)
@@ -42,7 +41,8 @@
void DataDetectionResult::encode(IPC::Encoder& encoder) const
{
RetainPtr<NSMutableData> data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ RetainPtr<NSKeyedArchiver> archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
[archiver encodeObject:results.get() forKey:@"dataDetectorResults"];
[archiver finishEncoding];
@@ -54,8 +54,9 @@
RetainPtr<CFDataRef> data;
if (!IPC::decode(decoder, data))
return false;
-
- auto unarchiver = secureUnarchiverFromData((NSData *)data.get());
+
+ RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)data.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
@try {
result.results = [unarchiver decodeObjectOfClasses:[NSSet setWithArray:@[ [NSArray class], getDDScannerResultClass()] ] forKey:@"dataDetectorResults"];
} @catch (NSException *exception) {
Modified: trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm (223899 => 223900)
--- trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,7 +30,6 @@
#import "DataReference.h"
#import <WebCore/PaymentAuthorizationStatus.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <pal/spi/cocoa/PassKitSPI.h>
#import <wtf/SoftLinking.h>
@@ -52,8 +51,10 @@
void ArgumentCoder<WebCore::Payment>::encode(Encoder& encoder, const WebCore::Payment& payment)
{
auto data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
+
[archiver encodeObject:payment.pkPayment() forKey:NSKeyedArchiveRootObjectKey];
[archiver finishEncoding];
@@ -67,7 +68,8 @@
return false;
auto data = "" alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(dataReference.data())) length:dataReference.size() freeWhenDone:NO]);
- auto unarchiver = secureUnarchiverFromData(data.get());
+ auto unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:data.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
@try {
PKPayment *pkPayment = [unarchiver decodeObjectOfClass:getPKPaymentClass() forKey:NSKeyedArchiveRootObjectKey];
payment = Payment(pkPayment);
@@ -104,8 +106,10 @@
void ArgumentCoder<WebCore::PaymentContact>::encode(Encoder& encoder, const WebCore::PaymentContact& paymentContact)
{
auto data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
+
[archiver encodeObject:paymentContact.pkContact() forKey:NSKeyedArchiveRootObjectKey];
[archiver finishEncoding];
@@ -119,7 +123,8 @@
return false;
auto data = "" alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(dataReference.data())) length:dataReference.size() freeWhenDone:NO]);
- auto unarchiver = secureUnarchiverFromData(data.get());
+ auto unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:data.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
@try {
PKContact *pkContact = [unarchiver decodeObjectOfClass:getPKContactClass() forKey:NSKeyedArchiveRootObjectKey];
paymentContact = PaymentContact(pkContact);
@@ -162,8 +167,10 @@
void ArgumentCoder<WebCore::PaymentMerchantSession>::encode(Encoder& encoder, const WebCore::PaymentMerchantSession& paymentMerchantSession)
{
auto data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
+
[archiver encodeObject:paymentMerchantSession.pkPaymentMerchantSession() forKey:NSKeyedArchiveRootObjectKey];
[archiver finishEncoding];
@@ -177,7 +184,8 @@
return false;
auto data = "" alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(dataReference.data())) length:dataReference.size() freeWhenDone:NO]);
- auto unarchiver = secureUnarchiverFromData(data.get());
+ auto unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:data.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
@try {
PKPaymentMerchantSession *pkPaymentMerchantSession = [unarchiver decodeObjectOfClass:getPKPaymentMerchantSessionClass() forKey:NSKeyedArchiveRootObjectKey];
paymentMerchantSession = PaymentMerchantSession(pkPaymentMerchantSession);
@@ -187,6 +195,7 @@
}
[unarchiver finishDecoding];
+
return true;
}
@@ -193,8 +202,10 @@
void ArgumentCoder<WebCore::PaymentMethod>::encode(Encoder& encoder, const WebCore::PaymentMethod& paymentMethod)
{
auto data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
+
[archiver encodeObject:paymentMethod.pkPaymentMethod() forKey:NSKeyedArchiveRootObjectKey];
[archiver finishEncoding];
@@ -208,7 +219,8 @@
return false;
auto data = "" alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(dataReference.data())) length:dataReference.size() freeWhenDone:NO]);
- auto unarchiver = secureUnarchiverFromData(data.get());
+ auto unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:data.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
@try {
PKPaymentMethod *pkPaymentMethod = [unarchiver decodeObjectOfClass:getPKPaymentMethodClass() forKey:NSKeyedArchiveRootObjectKey];
paymentMethod = PaymentMethod(pkPaymentMethod);
Modified: trunk/Source/WebKit/Shared/ios/InteractionInformationAtPosition.mm (223899 => 223900)
--- trunk/Source/WebKit/Shared/ios/InteractionInformationAtPosition.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/Shared/ios/InteractionInformationAtPosition.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,7 +29,6 @@
#import "ArgumentCodersCF.h"
#import "WebCoreArgumentCoders.h"
#import <pal/spi/cocoa/DataDetectorsCoreSPI.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <wtf/SoftLinking.h>
SOFT_LINK_PRIVATE_FRAMEWORK(DataDetectorsCore)
@@ -74,7 +73,8 @@
if (isDataDetectorLink) {
encoder << dataDetectorIdentifier;
RetainPtr<NSMutableData> data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ RetainPtr<NSKeyedArchiver> archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
[archiver encodeObject:dataDetectorResults.get() forKey:@"dataDetectorResults"];
[archiver finishEncoding];
@@ -168,7 +168,8 @@
if (!IPC::decode(decoder, data))
return false;
- auto unarchiver = secureUnarchiverFromData((NSData *)data.get());
+ RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)data.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
@try {
result.dataDetectorResults = [unarchiver decodeObjectOfClasses:[NSSet setWithArray:@[ [NSArray class], getDDScannerResultClass()] ] forKey:@"dataDetectorResults"];
} @catch (NSException *exception) {
Modified: trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm (223899 => 223900)
--- trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
* Copyright (C) 2013 Company 100 Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,6 @@
#import <WebCore/ResourceError.h>
#import <WebCore/ResourceRequest.h>
#import <pal/spi/cf/CFNetworkSPI.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#if USE(CFURLCONNECTION)
#import <CFNetwork/CFURLRequest.h>
@@ -473,8 +472,9 @@
void ArgumentCoder<ProtectionSpace>::encodePlatformData(Encoder& encoder, const ProtectionSpace& space)
{
- auto data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ RetainPtr<NSMutableData> data = "" alloc] init]);
+ RetainPtr<NSKeyedArchiver> archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
[archiver encodeObject:space.nsSpace() forKey:@"protectionSpace"];
[archiver finishEncoding];
IPC::encode(encoder, reinterpret_cast<CFDataRef>(data.get()));
@@ -486,7 +486,8 @@
if (!IPC::decode(decoder, data))
return false;
- auto unarchiver = secureUnarchiverFromData((NSData *)data.get());
+ RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)data.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
@try {
if (RetainPtr<NSURLProtectionSpace> nsSpace = [unarchiver decodeObjectOfClass:[NSURLProtectionSpace class] forKey:@"protectionSpace"])
space = ProtectionSpace(nsSpace.get());
@@ -518,8 +519,9 @@
}
encoder << false;
- auto data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ RetainPtr<NSMutableData> data = "" alloc] init]);
+ RetainPtr<NSKeyedArchiver> archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
[archiver encodeObject:nsCredential forKey:@"credential"];
[archiver finishEncoding];
IPC::encode(encoder, reinterpret_cast<CFDataRef>(data.get()));
@@ -558,7 +560,8 @@
if (!IPC::decode(decoder, data))
return false;
- auto unarchiver = secureUnarchiverFromData((NSData *)data.get());
+ RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)data.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
@try {
if (RetainPtr<NSURLCredential> nsCredential = [unarchiver decodeObjectOfClass:[NSURLCredential class] forKey:@"credential"])
credential = Credential(nsCredential.get());
@@ -619,8 +622,9 @@
#if ENABLE(CONTENT_FILTERING)
void ArgumentCoder<ContentFilterUnblockHandler>::encode(Encoder& encoder, const ContentFilterUnblockHandler& contentFilterUnblockHandler)
{
- auto data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ RetainPtr<NSMutableData> data = "" alloc] init]);
+ RetainPtr<NSKeyedArchiver> archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
contentFilterUnblockHandler.encode(archiver.get());
[archiver finishEncoding];
IPC::encode(encoder, reinterpret_cast<CFDataRef>(data.get()));
@@ -632,7 +636,8 @@
if (!IPC::decode(decoder, data))
return false;
- auto unarchiver = secureUnarchiverFromData((NSData *)data.get());
+ RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)data.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
if (!ContentFilterUnblockHandler::decode(unarchiver.get(), contentFilterUnblockHandler))
return false;
@@ -651,8 +656,9 @@
void ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData(Encoder& encoder, const MediaPlaybackTargetContext& target)
{
- auto data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ RetainPtr<NSMutableData> data = "" alloc] init]);
+ RetainPtr<NSKeyedArchiver> archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
if ([getAVOutputContextClass() conformsToProtocol:@protocol(NSSecureCoding)])
[archiver encodeObject:target.avOutputContext() forKey:deviceContextKey()];
@@ -671,7 +677,8 @@
if (!IPC::decode(decoder, data))
return false;
- auto unarchiver = secureUnarchiverFromData((NSData *)data.get());
+ RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)data.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
AVOutputContext *context = nil;
@try {
Modified: trunk/Source/WebKit/Shared/mac/WebHitTestResultData.mm (223899 => 223900)
--- trunk/Source/WebKit/Shared/mac/WebHitTestResultData.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/Shared/mac/WebHitTestResultData.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -33,7 +33,6 @@
#import "Encoder.h"
#import "WebCoreArgumentCoders.h"
#import <WebCore/TextIndicator.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <pal/spi/mac/DataDetectorsSPI.h>
namespace WebKit {
@@ -45,8 +44,9 @@
if (!hasActionContext)
return;
- auto data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ RetainPtr<NSMutableData> data = "" alloc] init]);
+ RetainPtr<NSKeyedArchiver> archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
[archiver encodeObject:detectedDataActionContext.get() forKey:@"actionContext"];
[archiver finishEncoding];
@@ -75,7 +75,8 @@
if (!IPC::decode(decoder, data))
return false;
- auto unarchiver = secureUnarchiverFromData((NSData *)data.get());
+ RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)data.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
@try {
hitTestResultData.detectedDataActionContext = [unarchiver decodeObjectOfClass:getDDActionContextClass() forKey:@"actionContext"];
} @catch (NSException *exception) {
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm (223899 => 223900)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -48,7 +48,6 @@
#import <WebCore/CertificateInfo.h>
#import <WebCore/PluginData.h>
#import <pal/spi/cf/CFNetworkSPI.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <wtf/RetainPtr.h>
#if PLATFORM(IOS)
@@ -214,7 +213,8 @@
auto copy = adoptNS([(NSObject *)object copy]);
auto data = "" alloc] init]);
- auto keyedArchiver = secureArchiverFromMutableData(data.get());
+ auto keyedArchiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [keyedArchiver setRequiresSecureCoding:YES];
@try {
[keyedArchiver encodeObject:copy.get() forKey:@"parameter"];
@@ -236,7 +236,8 @@
auto copy = adoptNS([[NSDictionary alloc] initWithDictionary:dictionary copyItems:YES]);
auto data = "" alloc] init]);
- auto keyedArchiver = secureArchiverFromMutableData(data.get());
+ auto keyedArchiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [keyedArchiver setRequiresSecureCoding:YES];
@try {
[keyedArchiver encodeObject:copy.get() forKey:@"parameters"];
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (223899 => 223900)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -102,7 +102,6 @@
#import <WebCore/ValidationBubble.h>
#import <WebCore/ViewportArguments.h>
#import <WebCore/WritingMode.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <pal/spi/mac/NSTextFinderSPI.h>
#import <wtf/BlockPtr.h>
#import <wtf/HashMap.h>
@@ -4526,7 +4525,8 @@
NSObject <NSSecureCoding> *userObject = nil;
if (API::Data* data = "" {
auto nsData = adoptNS([[NSData alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(data->bytes())) length:data->size() freeWhenDone:NO]);
- auto unarchiver = secureUnarchiverFromData(nsData.get());
+ auto unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:nsData.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
@try {
userObject = [unarchiver decodeObjectOfClass:[NSObject class] forKey:@"userObject"];
} @catch (NSException *exception) {
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (223899 => 223900)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -49,7 +49,6 @@
#import <WebCore/RuntimeApplicationChecks.h>
#import <WebCore/SharedBuffer.h>
#import <pal/spi/cf/CFNetworkSPI.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <sys/param.h>
#if PLATFORM(IOS)
@@ -216,8 +215,10 @@
if (m_bundleParameters) {
auto data = "" alloc] init]);
- auto keyedArchiver = secureArchiverFromMutableData(data.get());
+ auto keyedArchiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [keyedArchiver setRequiresSecureCoding:YES];
+
@try {
[keyedArchiver encodeObject:m_bundleParameters.get() forKey:@"parameters"];
[keyedArchiver finishEncoding];
Modified: trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (223899 => 223900)
--- trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -55,7 +55,6 @@
#import <WebCore/SharedBuffer.h>
#import <WebCore/TextIndicator.h>
#import <WebCore/ValidationBubble.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <wtf/BlockPtr.h>
#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, m_webView->_page->process().connection())
@@ -548,7 +547,8 @@
NSObject <NSSecureCoding> *userObject = nil;
if (API::Data* data = "" {
auto nsData = adoptNS([[NSData alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(data->bytes())) length:data->size() freeWhenDone:NO]);
- auto unarchiver = secureUnarchiverFromData(nsData.get());
+ auto unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:nsData.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
@try {
userObject = [unarchiver decodeObjectOfClass:[NSObject class] forKey:@"userObject"];
} @catch (NSException *exception) {
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm (223899 => 223900)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -65,7 +65,6 @@
#import <WebCore/HTMLFormElement.h>
#import <WebCore/HTMLInputElement.h>
#import <WebCore/MainFrame.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
using namespace WebCore;
using namespace WebKit;
@@ -485,7 +484,8 @@
return;
auto data = "" alloc] init]);
- auto archiver = secureArchiverFromMutableData(data.get());
+ auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+ [archiver setRequiresSecureCoding:YES];
@try {
[archiver encodeObject:userObject forKey:@"userObject"];
} @catch (NSException *exception) {
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm (223899 => 223900)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm 2017-10-24 18:04:37 UTC (rev 223899)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm 2017-10-24 18:14:03 UTC (rev 223900)
@@ -34,7 +34,6 @@
#import "WKWebProcessPlugInInternal.h"
#import "WebProcessCreationParameters.h"
#import <Foundation/NSBundle.h>
-#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
#import <stdio.h>
#import <wtf/RetainPtr.h>
#import <wtf/text/CString.h>
@@ -86,7 +85,8 @@
if (parameters.bundleParameterData) {
auto bundleParameterData = adoptNS([[NSData alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(parameters.bundleParameterData->bytes())) length:parameters.bundleParameterData->size() freeWhenDone:NO]);
- auto unarchiver = secureUnarchiverFromData(bundleParameterData.get());
+ auto unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:bundleParameterData.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
NSDictionary *dictionary = nil;
@try {
@@ -160,7 +160,8 @@
#if WK_API_ENABLED
auto bundleParameterData = adoptNS([[NSData alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(value.data())) length:value.size() freeWhenDone:NO]);
- auto unarchiver = secureUnarchiverFromData(bundleParameterData.get());
+ auto unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:bundleParameterData.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
id parameter = nil;
@try {
@@ -182,7 +183,8 @@
#if WK_API_ENABLED
auto bundleParametersData = adoptNS([[NSData alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(value.data())) length:value.size() freeWhenDone:NO]);
- auto unarchiver = secureUnarchiverFromData(bundleParametersData.get());
+ auto unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:bundleParametersData.get()]);
+ [unarchiver setRequiresSecureCoding:YES];
NSDictionary *parameters = nil;
@try {