Changeset 243320 in webkit
- Timestamp:
- Mar 21, 2019, 1:31:19 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebKit/ChangeLog ¶
r243319 r243320 1 2019-03-21 Chris Dumez <cdumez@apple.com> 2 3 WebKit should throw when trying to create a WKWebView with a related view that is using a different data store 4 https://bugs.webkit.org/show_bug.cgi?id=196041 5 <rdar://problem/49083230> 6 7 Reviewed by Alex Christensen. 8 9 WebKit should throw when trying to create a WKWebView with a related view that is using a different data store. 10 We do not support having several WebsiteDataStores sharing the same WebProcess. 11 12 * UIProcess/API/Cocoa/WKWebView.mm: 13 (-[WKWebView _initializeWithConfiguration:]): 14 * UIProcess/WebProcessPool.cpp: 15 (WebKit::WebProcessPool::createWebPage): 16 1 17 2019-03-21 Alex Christensen <achristensen@webkit.org> 2 18 -
TabularUnified trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm ¶
r243240 r243320 553 553 if (processPool && processPool != relatedWebViewProcessPool) 554 554 [NSException raise:NSInvalidArgumentException format:@"Related web view %@ has process pool %@ but configuration specifies a different process pool %@", relatedWebView, relatedWebViewProcessPool, configuration.processPool]; 555 if ([relatedWebView->_configuration websiteDataStore] != [_configuration websiteDataStore]) 556 [NSException raise:NSInvalidArgumentException format:@"Related web view %@ has data store %@ but configuration specifies a different data store %@", relatedWebView, [relatedWebView->_configuration websiteDataStore], [_configuration websiteDataStore]]; 555 557 556 558 [_configuration setProcessPool:relatedWebViewProcessPool]; -
TabularUnified trunk/Source/WebKit/UIProcess/WebProcessPool.cpp ¶
r243163 r243320 1216 1216 // Sharing processes, e.g. when creating the page via window.open(). 1217 1217 process = &pageConfiguration->relatedPage()->process(); 1218 // We do not support several WebsiteDataStores sharing a single process. 1219 ASSERT(process.get() == m_dummyProcessProxy || &pageConfiguration->websiteDataStore()->websiteDataStore() == &process->websiteDataStore()); 1220 ASSERT(&pageConfiguration->relatedPage()->websiteDataStore() == &pageConfiguration->websiteDataStore()->websiteDataStore()); 1218 1221 } else if (WebKit::isInspectorProcessPool(*this)) { 1219 1222 // Do not delay process launch for inspector pages as inspector pages do not know how to transition from a terminated process. -
TabularUnified trunk/Tools/ChangeLog ¶
r243319 r243320 1 2019-03-21 Chris Dumez <cdumez@apple.com> 2 3 WebKit should throw when trying to create a WKWebView with a related view that is using a different data store 4 https://bugs.webkit.org/show_bug.cgi?id=196041 5 <rdar://problem/49083230> 6 7 Reviewed by Alex Christensen. 8 9 Add API test coverage. 10 11 * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm: 12 (TEST): 13 1 14 2019-03-21 Alex Christensen <achristensen@webkit.org> 2 15 -
TabularUnified trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm ¶
r242339 r243320 29 29 #import <WebKit/WKWebView.h> 30 30 #import <WebKit/WKWebViewConfigurationPrivate.h> 31 #import <WebKit/WKWebsiteDataStore.h> 31 32 #import <wtf/Function.h> 32 33 #import <wtf/RetainPtr.h> … … 63 64 }); 64 65 #pragma clang diagnostic pop 66 67 // Related WebViews cannot use different data stores. 68 auto configurationForEphemeralView = adoptNS([[WKWebViewConfiguration alloc] init]); 69 configurationForEphemeralView.get().websiteDataStore = [WKWebsiteDataStore nonPersistentDataStore]; 70 auto ephemeralWebView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configurationForEphemeralView.get()]); 71 shouldThrowExceptionWhenUsed([&](WKWebViewConfiguration *configuration) { 72 [configuration _setRelatedWebView:ephemeralWebView.get()]; 73 }); 65 74 } 66 75
Note:
See TracChangeset
for help on using the changeset viewer.