Title: [187288] trunk/Source/WebKit2
Revision
187288
Author
[email protected]
Date
2015-07-23 21:53:26 -0700 (Thu, 23 Jul 2015)

Log Message

<rdar://problem/21929532> REGRESSION (r184026): Safari AutoFill with Contact info for phone number is broken
https://bugs.webkit.org/show_bug.cgi?id=147249

Reviewed by Sam Weinig.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeObject): Use encodeString only for strings that encode as NSString or
NSMutableString. It can’t encode arbitrary NSString subclasses.
(decodeObject): Use decodeString for NSMutableString as well.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (187287 => 187288)


--- trunk/Source/WebKit2/ChangeLog	2015-07-24 04:38:54 UTC (rev 187287)
+++ trunk/Source/WebKit2/ChangeLog	2015-07-24 04:53:26 UTC (rev 187288)
@@ -1,3 +1,15 @@
+2015-07-23  Dan Bernstein  <[email protected]>
+
+        <rdar://problem/21929532> REGRESSION (r184026): Safari AutoFill with Contact info for phone number is broken
+        https://bugs.webkit.org/show_bug.cgi?id=147249
+
+        Reviewed by Sam Weinig.
+
+        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
+        (encodeObject): Use encodeString only for strings that encode as NSString or
+        NSMutableString. It can’t encode arbitrary NSString subclasses.
+        (decodeObject): Use decodeString for NSMutableString as well.
+
 2015-07-23  Zalan Bujtas  <[email protected]>
 
         [iOS] REGRESSION (187131): Loading CuteOverload zooms in to the top left corner.

Modified: trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm (187287 => 187288)


--- trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm	2015-07-24 04:38:54 UTC (rev 187287)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm	2015-07-24 04:53:26 UTC (rev 187288)
@@ -241,7 +241,7 @@
         return;
     }
 
-    if ([object isKindOfClass:[NSString class]]) {
+    if (objectClass == [NSString class] || objectClass == [NSMutableString class]) {
         encodeString(encoder, object);
         return;
     }
@@ -586,6 +586,9 @@
     if (objectClass == [NSString class])
         return decodeString(decoder);
 
+    if (objectClass == [NSMutableString class])
+        return [NSMutableString stringWithString:decodeString(decoder)];
+
     id result = [objectClass allocWithZone:decoder.zone];
     if (!result)
         [NSException raise:NSInvalidUnarchiveOperationException format:@"Class \"%s\" returned nil from +alloc while being decoded", className.data()];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to