Changeset 158806 in webkit
- Timestamp:
- Nov 6, 2013 5:20:14 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r158805 r158806 1 2013-11-06 Anders Carlsson <andersca@apple.com> 2 3 Implement enough functionality so that NSURLRequest objects can be decoded 4 https://bugs.webkit.org/show_bug.cgi?id=123942 5 6 Reviewed by Andreas Kling. 7 8 * Shared/API/Cocoa/WKRemoteObjectCoder.mm: 9 (-[WKRemoteObjectEncoder requiresSecureCoding]): 10 Add new method. Return YES. 11 12 (-[WKRemoteObjectDecoder decodeValueOfObjCType:at:]): 13 Add new method. This currently only handles 'i', but we'll add more variants as needed. 14 15 (-[WKRemoteObjectDecoder decodeBoolForKey:]): 16 Get a WebBoolean from the dictionary and return its value. 17 1 18 2013-11-06 Anders Carlsson <andersca@apple.com> 2 19 -
trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm
r158805 r158806 256 256 } 257 257 258 - (BOOL)requiresSecureCoding 259 { 260 return YES; 261 } 262 258 263 @end 259 264 … … 283 288 284 289 return self; 290 } 291 292 - (void)decodeValueOfObjCType:(const char *)type at:(void *)data 293 { 294 switch (*type) { 295 // int 296 case 'i': 297 *static_cast<int*>(data) = [decodeObjectFromObjectStream(self, [NSSet setWithObject:[NSNumber class]]) intValue]; 298 break; 299 300 default: 301 [NSException raise:NSInvalidUnarchiveOperationException format:@"Unsupported type '%s'", type]; 302 } 285 303 } 286 304 … … 462 480 } 463 481 482 - (BOOL)decodeBoolForKey:(NSString *)key 483 { 484 const WebBoolean* value = _currentDictionary->get<WebBoolean>(escapeKey(key)); 485 if (!value) 486 return false; 487 return value->value(); 488 } 489 464 490 - (int64_t)decodeInt64ForKey:(NSString *)key 465 491 {
Note: See TracChangeset
for help on using the changeset viewer.