Title: [161804] trunk/Source/WebKit2
Revision
161804
Author
commit-qu...@webkit.org
Date
2014-01-11 23:31:52 -0800 (Sat, 11 Jan 2014)

Log Message

Support bool argument for encoding/decoding invocations.
https://bugs.webkit.org/show_bug.cgi?id=126823

Patch by Yongjun Zhang <yongjun_zh...@apple.com> on 2014-01-11
Reviewed by Sam Weinig.

For remote invocation method argument, current we support int, double and ObjC
object, this patch add support for bool type too.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
(decodeInvocationArguments):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (161803 => 161804)


--- trunk/Source/WebKit2/ChangeLog	2014-01-12 07:15:34 UTC (rev 161803)
+++ trunk/Source/WebKit2/ChangeLog	2014-01-12 07:31:52 UTC (rev 161804)
@@ -1,3 +1,17 @@
+2014-01-11  Yongjun Zhang  <yongjun_zh...@apple.com>
+
+        Support bool argument for encoding/decoding invocations.
+        https://bugs.webkit.org/show_bug.cgi?id=126823
+
+        Reviewed by Sam Weinig.
+
+        For remote invocation method argument, current we support int, double and ObjC
+        object, this patch add support for bool type too.
+
+        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
+        (encodeInvocation):
+        (decodeInvocationArguments):
+
 2014-01-11  Alexey Proskuryakov  <a...@apple.com>
 
         [Mac] [Windows] Stop scheduling network requests in WebCore

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


--- trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm	2014-01-12 07:15:34 UTC (rev 161803)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm	2014-01-12 07:31:52 UTC (rev 161804)
@@ -146,6 +146,15 @@
             break;
         }
 
+        // bool
+        case 'B': {
+            BOOL value;
+            [invocation getArgument:&value atIndex:i];;
+
+            encodeToObjectStream(encoder, @(value));
+            break;
+        }
+
         // Objective-C object
         case '@': {
             id value;
@@ -385,6 +394,13 @@
             break;
         }
 
+        // bool
+        case 'B': {
+            bool value = [decodeObjectFromObjectStream(decoder, [NSSet setWithObject:[NSNumber class]]) boolValue];
+            [invocation setArgument:&value atIndex:i];
+            break;
+        }
+
         // Objective-C object
         case '@': {
             NSSet *allowedClasses = allowedArgumentClasses[i - 2].get();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to