Changeset 86686 in webkit
- Timestamp:
- May 17, 2011, 10:39:59 AM (15 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
WebKit2.xcodeproj/project.pbxproj (modified) (2 diffs)
-
WebProcess/mac/WebProcessMac.mm (modified) (1 diff)
-
WebProcess/mac/WebProcessShim.h (modified) (1 diff)
-
WebProcess/mac/WebProcessShim.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r86678 r86686 3 3 Reviewed by Anders Carlsson. 4 4 5 Part one of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595 5 Part 2 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595 6 Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess 7 8 Hookup some of the methods we plan to shim in the patch, but just have them call through 9 to the actual implementations for now. 10 11 Also stub-out the future shimmed versions of the methods. 12 13 * WebProcess/mac/WebProcessShim.h: Add the methods to the shim callbacks. 14 * WebProcess/mac/WebProcessShim.mm: 15 (WebKit::shimSecItemCopyMatching): Call through to the actual function for now. 16 (WebKit::shimSecItemAdd): Ditto. 17 (WebKit::shimSecItemUpdate): Ditto. 18 (WebKit::shimSecItemDelete): Ditto. 19 (WebKit::WebKitWebProcessShimInitialize): Copy over the shim callbacks. 20 * WebKit2.xcodeproj/project.pbxproj: Link the shim to required frameworks. 21 22 * WebProcess/mac/WebProcessMac.mm: 23 (WebKit::WebSecItemCopyMatching): Add placeholders for the future to-be-shimmed functions. 24 (WebKit::WebSecItemAdd): Ditto. 25 (WebKit::WebSecItemUpdate): Ditto. 26 (WebKit::WebSecItemDelete): Ditto. 27 (WebKit::WebProcess::initializeShim): Pass along those placeholders to the shim initializer. 28 29 2011-05-17 Brady Eidson <beidson@apple.com> 30 31 Reviewed by Anders Carlsson. 32 33 Part 1 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595 6 34 Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess 7 35 -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r86678 r86686 370 370 51D02F6B132EC73700BEAA96 /* WebIconDatabaseProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D02F68132EC73700BEAA96 /* WebIconDatabaseProxyMessageReceiver.cpp */; }; 371 371 51D02F6C132EC73700BEAA96 /* WebIconDatabaseProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D02F69132EC73700BEAA96 /* WebIconDatabaseProxyMessages.h */; }; 372 51D1304E1382E5B700351EDD /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCF5068412431861005955AE /* Security.framework */; }; 372 373 6501BD1A12F1243400E9F248 /* WKBundleInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65B86F1712F11D7B00B7DD8A /* WKBundleInspector.cpp */; }; 373 374 659C551E130006410025C0C2 /* InjectedBundlePageResourceLoadClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6546A82913000164000CEB1C /* InjectedBundlePageResourceLoadClient.cpp */; }; … … 1808 1809 buildActionMask = 2147483647; 1809 1810 files = ( 1811 51D1304E1382E5B700351EDD /* Security.framework in Frameworks */, 1810 1812 ); 1811 1813 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm
r86678 r86686 240 240 } 241 241 242 static OSStatus WebSecItemCopyMatching(CFDictionaryRef query, CFTypeRef *result) 243 { 244 ASSERT_NOT_REACHED(); 245 return -1; 246 } 247 248 static OSStatus WebSecItemAdd(CFDictionaryRef query, CFTypeRef *result) 249 { 250 ASSERT_NOT_REACHED(); 251 return -1; 252 } 253 254 static OSStatus WebSecItemUpdate(CFDictionaryRef query, CFDictionaryRef attributesToUpdate) 255 { 256 ASSERT_NOT_REACHED(); 257 return -1; 258 } 259 260 static OSStatus WebSecItemDelete(CFDictionaryRef query) 261 { 262 ASSERT_NOT_REACHED(); 263 return -1; 264 } 265 242 266 void WebProcess::initializeShim() 243 267 { 244 268 const WebProcessShimCallbacks callbacks = { 269 WebSecItemCopyMatching, 270 WebSecItemAdd, 271 WebSecItemUpdate, 272 WebSecItemDelete 245 273 }; 246 274 -
trunk/Source/WebKit2/WebProcess/mac/WebProcessShim.h
r86678 r86686 30 30 31 31 struct WebProcessShimCallbacks { 32 OSStatus (*secItemCopyMatching)(CFDictionaryRef query, CFTypeRef *result); 33 OSStatus (*secItemAdd)(CFDictionaryRef attributes, CFTypeRef *result); 34 OSStatus (*secItemUpdate)(CFDictionaryRef query, CFDictionaryRef attributesToUpdate); 35 OSStatus (*secItemDelete)(CFDictionaryRef query); 32 36 }; 33 37 -
trunk/Source/WebKit2/WebProcess/mac/WebProcessShim.mm
r86678 r86686 26 26 #import "WebProcessShim.h" 27 27 28 #import <Security/SecItem.h> 29 28 30 #define DYLD_INTERPOSE(_replacement,_replacee) \ 29 31 __attribute__((used)) static struct{ const void* replacement; const void* replacee; } _interpose_##_replacee \ … … 34 36 extern "C" void WebKitWebProcessShimInitialize(const WebProcessShimCallbacks&); 35 37 38 static WebProcessShimCallbacks webProcessShimCallbacks; 39 40 static OSStatus shimSecItemCopyMatching(CFDictionaryRef query, CFTypeRef *result) 41 { 42 return SecItemCopyMatching(query, result); 43 } 44 45 static OSStatus shimSecItemAdd(CFDictionaryRef query, CFTypeRef *result) 46 { 47 return SecItemAdd(query, result); 48 } 49 50 static OSStatus shimSecItemUpdate(CFDictionaryRef query, CFDictionaryRef attributesToUpdate) 51 { 52 return SecItemUpdate(query, attributesToUpdate); 53 } 54 55 static OSStatus shimSecItemDelete(CFDictionaryRef query) 56 { 57 return SecItemDelete(query); 58 } 59 60 DYLD_INTERPOSE(shimSecItemCopyMatching, SecItemCopyMatching) 61 DYLD_INTERPOSE(shimSecItemAdd, SecItemAdd) 62 DYLD_INTERPOSE(shimSecItemUpdate, SecItemUpdate) 63 DYLD_INTERPOSE(shimSecItemDelete, SecItemDelete) 64 36 65 __attribute__((visibility("default"))) 37 66 void WebKitWebProcessShimInitialize(const WebProcessShimCallbacks& callbacks) 38 67 { 68 webProcessShimCallbacks = callbacks; 39 69 } 40 70
Note:
See TracChangeset
for help on using the changeset viewer.