Changeset 161804 in webkit


Ignore:
Timestamp:
Jan 11, 2014, 11:31:52 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Yongjun Zhang <yongjun_zhang@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):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r161796 r161804  
     12014-01-11  Yongjun Zhang  <yongjun_zhang@apple.com>
     2
     3        Support bool argument for encoding/decoding invocations.
     4        https://bugs.webkit.org/show_bug.cgi?id=126823
     5
     6        Reviewed by Sam Weinig.
     7
     8        For remote invocation method argument, current we support int, double and ObjC
     9        object, this patch add support for bool type too.
     10
     11        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
     12        (encodeInvocation):
     13        (decodeInvocationArguments):
     14
    1152014-01-11  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm

    r160653 r161804  
    147147        }
    148148
     149        // bool
     150        case 'B': {
     151            BOOL value;
     152            [invocation getArgument:&value atIndex:i];;
     153
     154            encodeToObjectStream(encoder, @(value));
     155            break;
     156        }
     157
    149158        // Objective-C object
    150159        case '@': {
     
    386395        }
    387396
     397        // bool
     398        case 'B': {
     399            bool value = [decodeObjectFromObjectStream(decoder, [NSSet setWithObject:[NSNumber class]]) boolValue];
     400            [invocation setArgument:&value atIndex:i];
     401            break;
     402        }
     403
    388404        // Objective-C object
    389405        case '@': {
Note: See TracChangeset for help on using the changeset viewer.