Changeset 158797 in webkit
- Timestamp:
- Nov 6, 2013 3:04:39 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r158792 r158797 1 2013-11-06 Anders Carlsson <andersca@apple.com> 2 3 Move allowed classes handling to decodeObject 4 https://bugs.webkit.org/show_bug.cgi?id=123930 5 6 Reviewed by Andreas Kling. 7 8 * Shared/API/Cocoa/WKRemoteObjectCoder.mm: 9 (decodeObjectFromObjectStream): 10 Pass allowed classes through to decodeObject. 11 12 (decodeObject): 13 Update to take an NSSet of allowed classes. If the set is nil, use the current set. 14 15 (-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]): 16 Pass classes to decodeObject. 17 1 18 2013-11-06 Sergio Correia <sergio.correia@openbossa.org> 2 19 -
trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm
r158784 r158797 295 295 } 296 296 297 static id decodeObject(WKRemoteObjectDecoder * decoder, const ImmutableDictionary*);297 static id decodeObject(WKRemoteObjectDecoder *, const ImmutableDictionary*, NSSet *allowedClasses); 298 298 299 299 static id decodeObjectFromObjectStream(WKRemoteObjectDecoder *decoder, NSSet *allowedClasses) … … 305 305 return nil; 306 306 307 TemporaryChange<NSSet *> allowedClassesChange(decoder->_allowedClasses, allowedClasses);308 309 307 const ImmutableDictionary* dictionary = decoder->_objectStream->at<ImmutableDictionary>(decoder->_objectStreamPosition++); 310 308 311 return decodeObject(decoder, dictionary );309 return decodeObject(decoder, dictionary, allowedClasses); 312 310 } 313 311 … … 444 442 } 445 443 446 static id decodeObject(WKRemoteObjectDecoder *decoder, const ImmutableDictionary* dictionary )444 static id decodeObject(WKRemoteObjectDecoder *decoder, const ImmutableDictionary* dictionary, NSSet *allowedClasses) 447 445 { 448 446 if (!dictionary) … … 451 449 TemporaryChange<const ImmutableDictionary*> dictionaryChange(decoder->_currentDictionary, dictionary); 452 450 451 // If no allowed classes were listed, just use the currently allowed classes. 452 if (!allowedClasses) 453 return decodeObject(decoder); 454 455 TemporaryChange<NSSet *> allowedClassesChange(decoder->_allowedClasses, allowedClasses); 453 456 return decodeObject(decoder); 454 457 } … … 487 490 - (id)decodeObjectOfClasses:(NSSet *)classes forKey:(NSString *)key 488 491 { 489 TemporaryChange<NSSet *> allowedClassesChange(_allowedClasses, classes); 490 491 return decodeObject(self, _currentDictionary->get<ImmutableDictionary>(escapeKey(key))); 492 return decodeObject(self, _currentDictionary->get<ImmutableDictionary>(escapeKey(key)), classes); 492 493 } 493 494
Note: See TracChangeset
for help on using the changeset viewer.