Changeset 230205 in webkit
- Timestamp:
- Apr 3, 2018 9:26:47 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r230203 r230205 1 2018-04-03 Chris Dumez <cdumez@apple.com> 2 3 Make SecurityOrigin safe to create and use from any thread 4 https://bugs.webkit.org/show_bug.cgi?id=184216 5 6 Reviewed by Youenn Fablet. 7 8 We found that we have a decent amount of code constructing and using SecurityOrigin 9 objects from non-main threads. Unfortunately, this was not safe, mostly due to 10 SecurityOrigin's reliance on the SchemeRegistry. 11 12 This patch makes it safe to construct a SecurityOrigin on any thread A and use 13 it later on the same thread A. However, developers still need to call isolatedCopy() 14 if they want to pass such object to another thread B. 15 16 * page/SecurityOrigin.cpp: 17 (WebCore::SecurityOrigin::canDisplay const): 18 * page/SecurityOrigin.h: 19 * page/SecurityPolicy.cpp: 20 (WebCore::originAccessMapLock): 21 (WebCore::originAccessMap): 22 (WebCore::SecurityPolicy::isAccessWhiteListed): 23 (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): 24 (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): 25 (WebCore::SecurityPolicy::resetOriginAccessWhitelists): 26 * platform/SchemeRegistry.cpp: 27 (WebCore::schemeRegistryLock): 28 (WebCore::allBuiltinSchemes): 29 (WebCore::builtinLocalURLSchemes): 30 (WebCore::localURLSchemes): 31 (WebCore::displayIsolatedURLSchemes): 32 (WebCore::builtinSecureSchemes): 33 (WebCore::secureSchemes): 34 (WebCore::builtinSchemesWithUniqueOrigins): 35 (WebCore::schemesWithUniqueOrigins): 36 (WebCore::builtinEmptyDocumentSchemes): 37 (WebCore::emptyDocumentSchemes): 38 (WebCore::schemesForbiddenFromDomainRelaxation): 39 (WebCore::builtinCanDisplayOnlyIfCanRequestSchemes): 40 (WebCore::canDisplayOnlyIfCanRequestSchemes): 41 (WebCore::notAllowingJavascriptURLsSchemes): 42 (WebCore::SchemeRegistry::registerURLSchemeAsLocal): 43 (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsLocal): 44 (WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing): 45 (WebCore::schemesAllowingDatabaseAccessInPrivateBrowsing): 46 (WebCore::builtinCORSEnabledSchemes): 47 (WebCore::CORSEnabledSchemes): 48 (WebCore::ContentSecurityPolicyBypassingSchemes): 49 (WebCore::cachePartitioningSchemes): 50 (WebCore::serviceWorkerSchemes): 51 (WebCore::alwaysRevalidatedSchemes): 52 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal): 53 (WebCore::SchemeRegistry::registerURLSchemeAsNoAccess): 54 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNoAccess): 55 (WebCore::SchemeRegistry::registerURLSchemeAsDisplayIsolated): 56 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated): 57 (WebCore::SchemeRegistry::registerURLSchemeAsSecure): 58 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure): 59 (WebCore::SchemeRegistry::canDisplayOnlyIfCanRequest): 60 (WebCore::SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest): 61 (WebCore::SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy): 62 (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy): 63 (WebCore::SchemeRegistry::schemeShouldBypassContentSecurityPolicy): 64 (WebCore::SchemeRegistry::registerURLSchemeAsCachePartitioned): 65 (WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme): 66 (WebCore::SchemeRegistry::registerURLSchemeServiceWorkersCanHandle): 67 (WebCore::SchemeRegistry::canServiceWorkersHandleURLScheme): 68 (WebCore::SchemeRegistry::isServiceWorkerContainerCustomScheme): 69 * platform/SchemeRegistry.h: 70 1 71 2018-04-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 72 -
trunk/Source/WebCore/page/SecurityOrigin.cpp
r230044 r230205 124 124 static bool shouldTreatAsPotentiallyTrustworthy(const String& protocol, const String& host) 125 125 { 126 // FIXME: despite the following SchemeRegistry functions using locks internally, we still127 // have a potential thread-safety issue with the strings being passed in. This is because128 // String::hash() will be called during lookup and it potentially modifies the String for129 // caching the hash.130 126 if (SchemeRegistry::shouldTreatURLSchemeAsSecure(protocol)) 131 127 return true; … … 553 549 } 554 550 555 URL SecurityOrigin::urlWithUniqueSecurityOrigin()556 {557 ASSERT(isMainThread());558 static NeverDestroyed<URL> uniqueSecurityOriginURL(ParsedURLString, MAKE_STATIC_STRING_IMPL("data:,"));559 return uniqueSecurityOriginURL;560 }561 562 551 bool SecurityOrigin::isLocalHostOrLoopbackIPAddress(const String& host) 563 552 { -
trunk/Source/WebCore/page/SecurityOrigin.h
r230044 r230205 201 201 WEBCORE_EXPORT bool isSameOriginAs(const SecurityOrigin&) const; 202 202 203 static URL urlWithUniqueSecurityOrigin();204 205 203 bool isPotentiallyTrustworthy() const { return m_isPotentiallyTrustworthy; } 206 204 -
trunk/Source/WebCore/page/SecurityPolicy.cpp
r228239 r230205 46 46 typedef HashMap<String, std::unique_ptr<OriginAccessWhiteList>> OriginAccessMap; 47 47 48 static Lock& originAccessMapLock() 49 { 50 static NeverDestroyed<Lock> lock; 51 return lock; 52 } 53 48 54 static OriginAccessMap& originAccessMap() 49 55 { 56 ASSERT(originAccessMapLock().isHeld()); 50 57 static NeverDestroyed<OriginAccessMap> originAccessMap; 51 58 return originAccessMap; … … 147 154 bool SecurityPolicy::isAccessWhiteListed(const SecurityOrigin* activeOrigin, const SecurityOrigin* targetOrigin) 148 155 { 156 Locker<Lock> locker(originAccessMapLock()); 149 157 if (OriginAccessWhiteList* list = originAccessMap().get(activeOrigin->toString())) { 150 158 for (auto& entry : *list) { … … 164 172 void SecurityPolicy::addOriginAccessWhitelistEntry(const SecurityOrigin& sourceOrigin, const String& destinationProtocol, const String& destinationDomain, bool allowDestinationSubdomains) 165 173 { 166 ASSERT(isMainThread());167 174 ASSERT(!sourceOrigin.isUnique()); 168 175 if (sourceOrigin.isUnique()) … … 170 177 171 178 String sourceString = sourceOrigin.toString(); 179 180 Locker<Lock> locker(originAccessMapLock()); 172 181 OriginAccessMap::AddResult result = originAccessMap().add(sourceString, nullptr); 173 182 if (result.isNewEntry) … … 180 189 void SecurityPolicy::removeOriginAccessWhitelistEntry(const SecurityOrigin& sourceOrigin, const String& destinationProtocol, const String& destinationDomain, bool allowDestinationSubdomains) 181 190 { 182 ASSERT(isMainThread());183 191 ASSERT(!sourceOrigin.isUnique()); 184 192 if (sourceOrigin.isUnique()) … … 186 194 187 195 String sourceString = sourceOrigin.toString(); 196 197 Locker<Lock> locker(originAccessMapLock()); 188 198 OriginAccessMap& map = originAccessMap(); 189 199 OriginAccessMap::iterator it = map.find(sourceString); … … 202 212 void SecurityPolicy::resetOriginAccessWhitelists() 203 213 { 204 ASSERT(isMainThread());214 Locker<Lock> locker(originAccessMapLock()); 205 215 originAccessMap().clear(); 206 216 } -
trunk/Source/WebCore/platform/SchemeRegistry.cpp
r228972 r230205 66 66 } 67 67 68 static Lock& schemeRegistryLock() 69 { 70 static NeverDestroyed<Lock> lock; 71 return lock; 72 } 73 68 74 static const URLSchemesMap& allBuiltinSchemes() 69 75 { … … 92 98 93 99 URLSchemesMap set; 94 for (auto& scheme : builtinLocalURLSchemes()) 95 set.add(scheme); 96 for (auto& function : functions) 97 add(set, function); 100 { 101 Locker<Lock> locker(schemeRegistryLock()); 102 for (auto& scheme : builtinLocalURLSchemes()) 103 set.add(scheme); 104 105 for (auto& function : functions) 106 add(set, function); 107 } 98 108 for (auto& scheme : otherSchemes) 99 109 set.add(scheme); … … 105 115 static const URLSchemesMap& builtinLocalURLSchemes() 106 116 { 117 ASSERT(schemeRegistryLock().isHeld()); 107 118 static const auto schemes = makeNeverDestroyed(URLSchemesMap { 108 119 "file", … … 114 125 } 115 126 116 static Lock& localURLSchemesLock()117 {118 static NeverDestroyed<Lock> lock;119 return lock;120 }121 122 127 static URLSchemesMap& localURLSchemes() 123 128 { 124 ASSERT( localURLSchemesLock().isHeld());129 ASSERT(schemeRegistryLock().isHeld()); 125 130 static NeverDestroyed<URLSchemesMap> localSchemes = builtinLocalURLSchemes(); 126 131 return localSchemes; … … 129 134 static URLSchemesMap& displayIsolatedURLSchemes() 130 135 { 136 ASSERT(schemeRegistryLock().isHeld()); 131 137 static NeverDestroyed<URLSchemesMap> displayIsolatedSchemes; 132 138 return displayIsolatedSchemes; … … 135 141 const Vector<String>& builtinSecureSchemes() 136 142 { 143 ASSERT(schemeRegistryLock().isHeld()); 137 144 static const auto schemes = makeNeverDestroyed(Vector<String> { 138 145 "https", … … 147 154 } 148 155 149 static Lock& secureSchemesLock()150 {151 static NeverDestroyed<Lock> lock;152 return lock;153 }154 155 156 static URLSchemesMap& secureSchemes() 156 157 { 157 ASSERT(s ecureSchemesLock().isHeld());158 ASSERT(schemeRegistryLock().isHeld()); 158 159 static auto secureSchemes = makeNeverDestroyedSchemeSet(builtinSecureSchemes); 159 160 return secureSchemes; … … 162 163 const Vector<String>& builtinSchemesWithUniqueOrigins() 163 164 { 165 ASSERT(schemeRegistryLock().isHeld()); 164 166 static const auto schemes = makeNeverDestroyed(Vector<String> { 165 167 "about", … … 174 176 static URLSchemesMap& schemesWithUniqueOrigins() 175 177 { 178 ASSERT(schemeRegistryLock().isHeld()); 176 179 static auto schemesWithUniqueOrigins = makeNeverDestroyedSchemeSet(builtinSchemesWithUniqueOrigins); 177 180 return schemesWithUniqueOrigins; … … 180 183 const Vector<String>& builtinEmptyDocumentSchemes() 181 184 { 185 ASSERT(isMainThread()); 182 186 static const auto schemes = makeNeverDestroyed(Vector<String> { "about" }); 183 187 return schemes; … … 186 190 static URLSchemesMap& emptyDocumentSchemes() 187 191 { 192 ASSERT(isMainThread()); 188 193 static auto emptyDocumentSchemes = makeNeverDestroyedSchemeSet(builtinEmptyDocumentSchemes); 189 194 return emptyDocumentSchemes; … … 192 197 static URLSchemesMap& schemesForbiddenFromDomainRelaxation() 193 198 { 199 ASSERT(isMainThread()); 194 200 static NeverDestroyed<URLSchemesMap> schemes; 195 201 return schemes; … … 198 204 const Vector<String>& builtinCanDisplayOnlyIfCanRequestSchemes() 199 205 { 206 ASSERT(schemeRegistryLock().isHeld()); 200 207 static const auto schemes = makeNeverDestroyed(Vector<String> { "blob" }); 201 208 return schemes; … … 204 211 static URLSchemesMap& canDisplayOnlyIfCanRequestSchemes() 205 212 { 213 ASSERT(schemeRegistryLock().isHeld()); 206 214 static auto canDisplayOnlyIfCanRequestSchemes = makeNeverDestroyedSchemeSet(builtinCanDisplayOnlyIfCanRequestSchemes); 207 215 return canDisplayOnlyIfCanRequestSchemes; … … 210 218 static URLSchemesMap& notAllowingJavascriptURLsSchemes() 211 219 { 220 ASSERT(isMainThread()); 212 221 static NeverDestroyed<URLSchemesMap> notAllowingJavascriptURLsSchemes; 213 222 return notAllowingJavascriptURLsSchemes; … … 219 228 return; 220 229 221 Locker<Lock> locker( localURLSchemesLock());230 Locker<Lock> locker(schemeRegistryLock()); 222 231 localURLSchemes().add(scheme); 223 232 } … … 225 234 void SchemeRegistry::removeURLSchemeRegisteredAsLocal(const String& scheme) 226 235 { 227 Locker<Lock> locker( localURLSchemesLock());236 Locker<Lock> locker(schemeRegistryLock()); 228 237 if (builtinLocalURLSchemes().contains(scheme)) 229 238 return; … … 234 243 static URLSchemesMap& schemesAllowingLocalStorageAccessInPrivateBrowsing() 235 244 { 245 ASSERT(isMainThread()); 236 246 static NeverDestroyed<URLSchemesMap> schemesAllowingLocalStorageAccessInPrivateBrowsing; 237 247 return schemesAllowingLocalStorageAccessInPrivateBrowsing; … … 240 250 static URLSchemesMap& schemesAllowingDatabaseAccessInPrivateBrowsing() 241 251 { 252 ASSERT(isMainThread()); 242 253 static NeverDestroyed<URLSchemesMap> schemesAllowingDatabaseAccessInPrivateBrowsing; 243 254 return schemesAllowingDatabaseAccessInPrivateBrowsing; … … 246 257 const Vector<String>& builtinCORSEnabledSchemes() 247 258 { 259 ASSERT(isMainThread()); 248 260 static const auto schemes = makeNeverDestroyed(Vector<String> { "http", "https" }); 249 261 return schemes; … … 252 264 static URLSchemesMap& CORSEnabledSchemes() 253 265 { 266 ASSERT(isMainThread()); 254 267 // FIXME: http://bugs.webkit.org/show_bug.cgi?id=77160 255 268 static auto schemes = makeNeverDestroyedSchemeSet(builtinCORSEnabledSchemes); … … 259 272 static URLSchemesMap& ContentSecurityPolicyBypassingSchemes() 260 273 { 274 ASSERT(schemeRegistryLock().isHeld()); 261 275 static NeverDestroyed<URLSchemesMap> schemes; 262 276 return schemes; … … 265 279 static URLSchemesMap& cachePartitioningSchemes() 266 280 { 281 ASSERT(schemeRegistryLock().isHeld()); 267 282 static NeverDestroyed<URLSchemesMap> schemes; 268 283 return schemes; 269 284 } 270 285 271 static Lock& serviceWorkerSchemesLock()272 {273 static NeverDestroyed<Lock> lock;274 return lock;275 }276 277 286 static URLSchemesMap& serviceWorkerSchemes() 278 287 { 279 ASSERT(s erviceWorkerSchemesLock().isHeld());288 ASSERT(schemeRegistryLock().isHeld()); 280 289 static NeverDestroyed<URLSchemesMap> schemes; 281 290 return schemes; … … 284 293 static URLSchemesMap& alwaysRevalidatedSchemes() 285 294 { 295 ASSERT(isMainThread()); 286 296 static NeverDestroyed<URLSchemesMap> schemes; 287 297 return schemes; … … 293 303 return false; 294 304 295 Locker<Lock> locker( localURLSchemesLock());305 Locker<Lock> locker(schemeRegistryLock()); 296 306 return localURLSchemes().contains(scheme); 297 307 } … … 301 311 if (scheme.isNull()) 302 312 return; 313 314 Locker<Lock> locker(schemeRegistryLock()); 303 315 schemesWithUniqueOrigins().add(scheme); 304 316 } … … 306 318 bool SchemeRegistry::shouldTreatURLSchemeAsNoAccess(const String& scheme) 307 319 { 308 return !scheme.isNull() && schemesWithUniqueOrigins().contains(scheme); 320 if (scheme.isNull()) 321 return false; 322 323 Locker<Lock> locker(schemeRegistryLock()); 324 return schemesWithUniqueOrigins().contains(scheme); 309 325 } 310 326 … … 313 329 if (scheme.isNull()) 314 330 return; 331 332 Locker<Lock> locker(schemeRegistryLock()); 315 333 displayIsolatedURLSchemes().add(scheme); 316 334 } … … 318 336 bool SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated(const String& scheme) 319 337 { 320 return !scheme.isNull() && displayIsolatedURLSchemes().contains(scheme); 338 if (scheme.isNull()) 339 return false; 340 341 Locker<Lock> locker(schemeRegistryLock()); 342 return displayIsolatedURLSchemes().contains(scheme); 321 343 } 322 344 … … 326 348 return; 327 349 328 Locker<Lock> locker(s ecureSchemesLock());350 Locker<Lock> locker(schemeRegistryLock()); 329 351 secureSchemes().add(scheme); 330 352 } … … 335 357 return false; 336 358 337 Locker<Lock> locker(s ecureSchemesLock());359 Locker<Lock> locker(schemeRegistryLock()); 338 360 return secureSchemes().contains(scheme); 339 361 } … … 369 391 bool SchemeRegistry::canDisplayOnlyIfCanRequest(const String& scheme) 370 392 { 371 return !scheme.isNull() && canDisplayOnlyIfCanRequestSchemes().contains(scheme); 393 if (scheme.isNull()) 394 return false; 395 396 Locker<Lock> locker(schemeRegistryLock()); 397 return canDisplayOnlyIfCanRequestSchemes().contains(scheme); 372 398 } 373 399 … … 376 402 if (scheme.isNull()) 377 403 return; 404 405 Locker<Lock> locker(schemeRegistryLock()); 378 406 canDisplayOnlyIfCanRequestSchemes().add(scheme); 379 407 } … … 431 459 if (scheme.isNull()) 432 460 return; 461 462 Locker<Lock> locker(schemeRegistryLock()); 433 463 ContentSecurityPolicyBypassingSchemes().add(scheme); 434 464 } … … 438 468 if (scheme.isNull()) 439 469 return; 470 471 Locker<Lock> locker(schemeRegistryLock()); 440 472 ContentSecurityPolicyBypassingSchemes().remove(scheme); 441 473 } … … 443 475 bool SchemeRegistry::schemeShouldBypassContentSecurityPolicy(const String& scheme) 444 476 { 445 return !scheme.isNull() && ContentSecurityPolicyBypassingSchemes().contains(scheme); 477 if (scheme.isNull()) 478 return false; 479 480 Locker<Lock> locker(schemeRegistryLock()); 481 return ContentSecurityPolicyBypassingSchemes().contains(scheme); 446 482 } 447 483 … … 462 498 if (scheme.isNull()) 463 499 return; 500 501 Locker<Lock> locker(schemeRegistryLock()); 464 502 cachePartitioningSchemes().add(scheme); 465 503 } … … 467 505 bool SchemeRegistry::shouldPartitionCacheForURLScheme(const String& scheme) 468 506 { 469 return !scheme.isNull() && cachePartitioningSchemes().contains(scheme); 507 if (scheme.isNull()) 508 return false; 509 510 Locker<Lock> locker(schemeRegistryLock()); 511 return cachePartitioningSchemes().contains(scheme); 470 512 } 471 513 … … 475 517 return; 476 518 477 Locker<Lock> locker(s erviceWorkerSchemesLock());519 Locker<Lock> locker(schemeRegistryLock()); 478 520 serviceWorkerSchemes().add(scheme); 479 521 } … … 491 533 } 492 534 493 Locker<Lock> locker(s erviceWorkerSchemesLock());535 Locker<Lock> locker(schemeRegistryLock()); 494 536 return serviceWorkerSchemes().contains(scheme); 495 537 } … … 497 539 bool SchemeRegistry::isServiceWorkerContainerCustomScheme(const String& scheme) 498 540 { 499 Locker<Lock> locker(s erviceWorkerSchemesLock());541 Locker<Lock> locker(schemeRegistryLock()); 500 542 return !scheme.isNull() && serviceWorkerSchemes().contains(scheme); 501 543 } -
trunk/Source/WebCore/platform/SchemeRegistry.h
r229869 r230205 38 38 class SchemeRegistry { 39 39 public: 40 WEBCORE_EXPORT static void registerURLSchemeAsLocal(const String&); 41 static void removeURLSchemeRegisteredAsLocal(const String&); 40 WEBCORE_EXPORT static void registerURLSchemeAsLocal(const String&); // Thread safe. 41 static void removeURLSchemeRegisteredAsLocal(const String&); // Thread safe. 42 42 43 WEBCORE_EXPORT static bool shouldTreatURLSchemeAsLocal(const String&); 43 WEBCORE_EXPORT static bool shouldTreatURLSchemeAsLocal(const String&); // Thread safe. 44 44 WEBCORE_EXPORT static bool isBuiltinScheme(const String&); 45 45 … … 47 47 // https and data are secure schemes because they cannot be corrupted by 48 48 // active network attackers. 49 WEBCORE_EXPORT static void registerURLSchemeAsSecure(const String&); 50 static bool shouldTreatURLSchemeAsSecure(const String&); 49 WEBCORE_EXPORT static void registerURLSchemeAsSecure(const String&); // Thread safe. 50 static bool shouldTreatURLSchemeAsSecure(const String&); // Thread safe. 51 51 52 WEBCORE_EXPORT static void registerURLSchemeAsNoAccess(const String&); 53 static bool shouldTreatURLSchemeAsNoAccess(const String&); 52 WEBCORE_EXPORT static void registerURLSchemeAsNoAccess(const String&); // Thread safe. 53 static bool shouldTreatURLSchemeAsNoAccess(const String&); // Thread safe. 54 54 55 55 // Display-isolated schemes can only be displayed (in the sense of 56 56 // SecurityOrigin::canDisplay) by documents from the same scheme. 57 WEBCORE_EXPORT static void registerURLSchemeAsDisplayIsolated(const String&); 58 static bool shouldTreatURLSchemeAsDisplayIsolated(const String&); 57 WEBCORE_EXPORT static void registerURLSchemeAsDisplayIsolated(const String&); // Thread safe. 58 static bool shouldTreatURLSchemeAsDisplayIsolated(const String&); // Thread safe. 59 59 60 60 WEBCORE_EXPORT static void registerURLSchemeAsEmptyDocument(const String&); … … 66 66 // Such schemes should delegate to SecurityOrigin::canRequest for any URL 67 67 // passed to SecurityOrigin::canDisplay. 68 static bool canDisplayOnlyIfCanRequest(const String& scheme); 69 WEBCORE_EXPORT static void registerAsCanDisplayOnlyIfCanRequest(const String& scheme); 68 static bool canDisplayOnlyIfCanRequest(const String& scheme); // Thread safe. 69 WEBCORE_EXPORT static void registerAsCanDisplayOnlyIfCanRequest(const String& scheme); // Thread safe. 70 70 71 71 // Schemes against which javascript: URLs should not be allowed to run (stop … … 87 87 // Allow resources from some schemes to load on a page, regardless of its 88 88 // Content Security Policy. 89 WEBCORE_EXPORT static void registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme); 90 WEBCORE_EXPORT static void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const String& scheme); 91 static bool schemeShouldBypassContentSecurityPolicy(const String& scheme); 89 WEBCORE_EXPORT static void registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme); // Thread safe. 90 WEBCORE_EXPORT static void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const String& scheme); // Thread safe. 91 static bool schemeShouldBypassContentSecurityPolicy(const String& scheme); // Thread safe. 92 92 93 93 // Schemes whose responses should always be revalidated. … … 96 96 97 97 // Schemes whose requests should be partitioned in the cache 98 WEBCORE_EXPORT static void registerURLSchemeAsCachePartitioned(const String& scheme); 99 static bool shouldPartitionCacheForURLScheme(const String& scheme); 98 WEBCORE_EXPORT static void registerURLSchemeAsCachePartitioned(const String& scheme); // Thread safe. 99 static bool shouldPartitionCacheForURLScheme(const String& scheme); // Thread safe. 100 100 101 101 // Schemes besides http(s) that service workers are allowed to handle 102 WEBCORE_EXPORT static void registerURLSchemeServiceWorkersCanHandle(const String& scheme); 103 WEBCORE_EXPORT static bool canServiceWorkersHandleURLScheme(const String& scheme); 104 static bool isServiceWorkerContainerCustomScheme(const String& scheme); 102 WEBCORE_EXPORT static void registerURLSchemeServiceWorkersCanHandle(const String& scheme); // Thread safe. 103 WEBCORE_EXPORT static bool canServiceWorkersHandleURLScheme(const String& scheme); // Thread safe. 104 static bool isServiceWorkerContainerCustomScheme(const String& scheme); // Thread safe. 105 105 106 106 static bool isUserExtensionScheme(const String& scheme);
Note: See TracChangeset
for help on using the changeset viewer.