Title: [242953] trunk/Source/WebKit
- Revision
- 242953
- Author
- [email protected]
- Date
- 2019-03-14 12:22:06 -0700 (Thu, 14 Mar 2019)
Log Message
REGRESSION (r242908): TestWebKitAPI.WebKit.AddAndRemoveDataDetectors Crashed
https://bugs.webkit.org/show_bug.cgi?id=195751
Reviewed by Wenson Hsieh.
* Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::decodeArrayInternal): Added allowedClasses, pass to internal decodeObject for values.
(IPC::decodeDictionaryInternal): Ditto for keys and values.
(IPC::decodeObject): Pass allowedClasses to array and dictionary decoders.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (242952 => 242953)
--- trunk/Source/WebKit/ChangeLog 2019-03-14 19:11:52 UTC (rev 242952)
+++ trunk/Source/WebKit/ChangeLog 2019-03-14 19:22:06 UTC (rev 242953)
@@ -1,3 +1,15 @@
+2019-03-14 Timothy Hatcher <[email protected]>
+
+ REGRESSION (r242908): TestWebKitAPI.WebKit.AddAndRemoveDataDetectors Crashed
+ https://bugs.webkit.org/show_bug.cgi?id=195751
+
+ Reviewed by Wenson Hsieh.
+
+ * Shared/Cocoa/ArgumentCodersCocoa.mm:
+ (IPC::decodeArrayInternal): Added allowedClasses, pass to internal decodeObject for values.
+ (IPC::decodeDictionaryInternal): Ditto for keys and values.
+ (IPC::decodeObject): Pass allowedClasses to array and dictionary decoders.
+
2019-03-14 Chris Dumez <[email protected]>
[PSON] Make sure the WebProcessCache is leverage when relaunching a process after termination
Modified: trunk/Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm (242952 => 242953)
--- trunk/Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm 2019-03-14 19:11:52 UTC (rev 242952)
+++ trunk/Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm 2019-03-14 19:22:06 UTC (rev 242953)
@@ -153,7 +153,7 @@
}
}
-static Optional<RetainPtr<id>> decodeArrayInternal(Decoder& decoder)
+static Optional<RetainPtr<id>> decodeArrayInternal(Decoder& decoder, NSArray<Class> *allowedClasses)
{
uint64_t size;
if (!decoder.decode(size))
@@ -161,7 +161,7 @@
RetainPtr<NSMutableArray> array = adoptNS([[NSMutableArray alloc] initWithCapacity:size]);
for (uint64_t i = 0; i < size; ++i) {
- auto value = decodeObject(decoder, nil);
+ auto value = decodeObject(decoder, allowedClasses);
if (!value)
return WTF::nullopt;
[array addObject:value.value().get()];
@@ -251,7 +251,7 @@
}
}
-static Optional<RetainPtr<id>> decodeDictionaryInternal(Decoder& decoder)
+static Optional<RetainPtr<id>> decodeDictionaryInternal(Decoder& decoder, NSArray<Class> *allowedClasses)
{
uint64_t size;
if (!decoder.decode(size))
@@ -259,11 +259,11 @@
RetainPtr<NSMutableDictionary> dictionary = adoptNS([[NSMutableDictionary alloc] initWithCapacity:size]);
for (uint64_t i = 0; i < size; ++i) {
- auto key = decodeObject(decoder, nil);
+ auto key = decodeObject(decoder, allowedClasses);
if (!key)
return WTF::nullopt;
- auto value = decodeObject(decoder, nil);
+ auto value = decodeObject(decoder, allowedClasses);
if (!value)
return WTF::nullopt;
@@ -434,13 +434,13 @@
switch (type) {
case NSType::Array:
- return decodeArrayInternal(decoder);
+ return decodeArrayInternal(decoder, allowedClasses);
#if USE(APPKIT)
case NSType::Color:
return decodeColorInternal(decoder);
#endif
case NSType::Dictionary:
- return decodeDictionaryInternal(decoder);
+ return decodeDictionaryInternal(decoder, allowedClasses);
case NSType::Font:
return decodeFontInternal(decoder);
case NSType::Number:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes