Changeset 286368 in webkit
- Timestamp:
- Dec 1, 2021, 9:50:30 AM (4 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r286355 r286368 1 2021-12-01 Tim Horton <timothy_horton@apple.com> 2 3 REGRESSION (r286346): ResourceLoadDelegate.LoadInfo fails 4 https://bugs.webkit.org/show_bug.cgi?id=233689 5 6 Reviewed by Simon Fraser. 7 8 * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm: 9 This test asserts that archiving a _WKResourceLoadInfo via NSKeyedArchiver 10 encodes to a particular size (607 bytes). 11 12 If you look at the resultant plist before r286346, the encoded frameID 13 and resourceLoadID have the same value, and because of NSKeyedArchiver 14 deduplication, share the same object. 15 16 If you look at the resultant plist *after* r286346, the encoded frameID 17 is one larger than the resourceLoadID, thus cannot be deduplicated, and 18 end up encoding as separate objects. This results in the encoded size 19 increasing to 612 bytes. 20 21 The reason that the encoded frameID is now one value larger is that 22 ObjectIdentifier uses a global identifier pool, and r286346 creates 23 one more ObjectIdentifier during EventHandler construction, destroying 24 our entirely coincidental ID overlap, and causing the aforementioned 25 encoded size change. 26 27 Remove this assertion from the test, since it is very aggressive and 28 seems unnecessary. We could instead just rebaseline the test, but it 29 seems insufficiently important to burden some future developer with 30 a repeat of this evening of exploration and discovery. 31 1 32 2021-12-01 Brady Eidson <beidson@apple.com> 2 33 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm
r283714 r286368 380 380 NSError *error = nil; 381 381 NSData *archiveData = [NSKeyedArchiver archivedDataWithRootObject:original requiringSecureCoding:YES error:&error]; 382 EXPECT_EQ(archiveData.length, 607ull);383 382 EXPECT_FALSE(error); 384 383 _WKResourceLoadInfo *deserialized = [NSKeyedUnarchiver unarchivedObjectOfClass:[_WKResourceLoadInfo class] fromData:archiveData error:&error];
Note:
See TracChangeset
for help on using the changeset viewer.