WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
180127
Adopt updated NSKeyed[Un]Archiver API when available
https://bugs.webkit.org/show_bug.cgi?id=180127
Summary
Adopt updated NSKeyed[Un]Archiver API when available
Brent Fulgham
Reported
2017-11-28 21:37:11 PST
Update WebKit/WebCore to use updated NSKeyed[Un]Archiver API when available.
Attachments
Patch
(49.41 KB, patch)
2017-11-28 22:38 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch Part 1 (Landed)
(49.39 KB, patch)
2017-11-28 23:36 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch Part 2
(21.42 KB, patch)
2017-11-29 14:25 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(21.42 KB, patch)
2017-11-29 14:41 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(21.43 KB, patch)
2017-11-29 14:51 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(21.06 KB, patch)
2017-11-29 15:01 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(22.22 KB, patch)
2017-11-29 16:10 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(22.33 KB, patch)
2017-11-29 16:20 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2017-11-28 22:07:15 PST
<
rdar://problem/35710738
>
Brent Fulgham
Comment 2
2017-11-28 22:22:43 PST
Note: This change adopts the new APIs where they match the behavior of existing WebKit code. No attempts are made in this patch to apply NSSecureCoding in places we were not previously. There should be absolutely no change in behavior with this patch.
Brent Fulgham
Comment 3
2017-11-28 22:38:35 PST
Created
attachment 327834
[details]
Patch
Alex Christensen
Comment 4
2017-11-28 23:06:54 PST
Comment on
attachment 327834
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327834&action=review
r=me with comments. Don't break anything.
> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:34 > +#if USE(APPLE_INTERNAL_SDK) && USE(SECURE_BY_DEFAULT_ARCHIVER_API) > + > +#import <Foundation/NSKeyedArchiver_Private.h> > + > +#else
I think this would look nicer if it were arranged like this: #if USE(SECURE_BY_DEFAULT_ARCHIVER_API) #if USE(APPLE_INTERNAL_SDK) #import <Foundation/NSKeyedArchiver_Private.h> #else ... #endif #endif I would also call SECURE_BY_DEFAULT_ARCHIVER_API SECURE_ARCHIVER_API
> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:62 > +#include <wtf/RetainPtr.h>
This looks strange in the middle of the file. The things below this are also not SPI declarations. Maybe they could go in a different header.
> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:77 > +inline NSData *_Nullable archivedDataWithRootObject(id _Nonnull object)
Would it make sense to call this insecurelyArchivedDataWithRootObject to mirror securelyArchivedDataWithRootObject and emphasize that it's insecure?
> Source/WebCore/loader/archive/cf/LegacyWebArchiveMac.mm:49 > @try {
Could we have this outside of the #if to have mirrored braces?
Brent Fulgham
Comment 5
2017-11-28 23:27:02 PST
Comment on
attachment 327834
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327834&action=review
>> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:34 >> +#else > > I think this would look nicer if it were arranged like this: > > #if USE(SECURE_BY_DEFAULT_ARCHIVER_API) > #if USE(APPLE_INTERNAL_SDK) > #import <Foundation/NSKeyedArchiver_Private.h> > #else > ... > #endif > #endif > > I would also call SECURE_BY_DEFAULT_ARCHIVER_API SECURE_ARCHIVER_API
Ok!
>> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:62 >> +#include <wtf/RetainPtr.h> > > This looks strange in the middle of the file. The things below this are also not SPI declarations. Maybe they could go in a different header.
I'll move the #include, but I don't think these utility functions need to be moved. They allow us to build on systems with or without access to this SPI without requiring tons of #if/defs all over our codebase.
>> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:77 >> +inline NSData *_Nullable archivedDataWithRootObject(id _Nonnull object) > > Would it make sense to call this insecurelyArchivedDataWithRootObject to mirror securelyArchivedDataWithRootObject and emphasize that it's insecure?
Sure -- that's a good idea.
>> Source/WebCore/loader/archive/cf/LegacyWebArchiveMac.mm:49 >> @try { > > Could we have this outside of the #if to have mirrored braces?
No -- there are differences in the implementations inside the #if/else.
Brent Fulgham
Comment 6
2017-11-28 23:36:26 PST
Created
attachment 327839
[details]
Patch Part 1 (Landed)
WebKit Commit Bot
Comment 7
2017-11-28 23:52:51 PST
Comment on
attachment 327839
[details]
Patch Part 1 (Landed) Clearing flags on attachment: 327839 Committed
r225264
: <
https://trac.webkit.org/changeset/225264
>
WebKit Commit Bot
Comment 8
2017-11-28 23:52:53 PST
All reviewed patches have been landed. Closing bug.
Brent Fulgham
Comment 9
2017-11-29 12:44:56 PST
Reopening for a second fix needed for another API call that changed.
Brent Fulgham
Comment 10
2017-11-29 14:25:07 PST
Created
attachment 327907
[details]
Patch Part 2
EWS Watchlist
Comment 11
2017-11-29 14:27:29 PST
Attachment 327907
[details]
did not pass style-queue: ERROR: Source/WebKit/Shared/ios/InteractionInformationAtPosition.mm:86: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 12
2017-11-29 14:41:48 PST
Created
attachment 327909
[details]
Patch
Brent Fulgham
Comment 13
2017-11-29 14:51:26 PST
Created
attachment 327913
[details]
Patch
Brent Fulgham
Comment 14
2017-11-29 15:01:30 PST
Created
attachment 327914
[details]
Patch
Brent Fulgham
Comment 15
2017-11-29 16:09:20 PST
Simon discovered another deprecation error, so revising the patch.
Brent Fulgham
Comment 16
2017-11-29 16:10:05 PST
Created
attachment 327919
[details]
Patch
Brent Fulgham
Comment 17
2017-11-29 16:20:26 PST
Created
attachment 327921
[details]
Patch
WebKit Commit Bot
Comment 18
2017-11-29 17:41:00 PST
Comment on
attachment 327921
[details]
Patch Clearing flags on attachment: 327921 Committed
r225309
: <
https://trac.webkit.org/changeset/225309
>
WebKit Commit Bot
Comment 19
2017-11-29 17:41:02 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug