Changeset 206922 in webkit
- Timestamp:
- Oct 7, 2016 11:55:09 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r206921 r206922 1 2016-10-07 Andreas Kling <akling@apple.com> 2 3 [WK2] didRemoveFrameFromHierarchy callback doesn't fire for subframes when evicting from PageCache. 4 <https://webkit.org/b/163098> 5 <rdar://problem/28663488> 6 7 Reviewed by Antti Koivisto. 8 9 Fix a bug where WK2 didRemoveFrameFromHierarchy callbacks wouldn't fire for subframes that were getting 10 kicked out of PageCache. The problem was happening because CachedFrame would disconnect the Frame from 11 its Page just before calling FrameLoader::detachViewsAndDocumentLoader() where the callbacks are fired. 12 Without a Page, the WebFrame on WK2 side can't find its WebPage, and so it can't fire its callbacks. 13 14 The fix is just to switch the order of those two lines. 15 16 This bug was causing frequent DOM and window object leaks in some clients *cough* Safari *cough* that 17 were relying on didRemoveFrameFromHierarchy to release their isolated worlds. 18 19 Test: WebKit2.DidRemoveFrameFromHiearchyInPageCache 20 21 * history/CachedFrame.cpp: 22 (WebCore::CachedFrame::destroy): 23 1 24 2016-10-07 Nan Wang <n_wang@apple.com> 2 25 -
trunk/Source/WebCore/history/CachedFrame.cpp
r206006 r206922 249 249 250 250 if (!m_isMainFrame) { 251 m_view->frame().loader().detachViewsAndDocumentLoader(); 251 252 m_view->frame().detachFromPage(); 252 m_view->frame().loader().detachViewsAndDocumentLoader();253 253 } 254 254 -
trunk/Tools/ChangeLog
r206918 r206922 1 2016-10-07 Andreas Kling <akling@apple.com> 2 3 [WK2] didRemoveFrameFromHierarchy callback doesn't fire for subframes when evicting from PageCache. 4 <https://webkit.org/b/163098> 5 <rdar://problem/28663488> 6 7 Reviewed by Antti Koivisto. 8 9 Add an API test that puts a 10-subframe page into the page cache, then loads other pages 10 until the first page gets kicked out. The test succeeds if we receive didRemoveFrameFromHierarchy 11 callbacks for all the subframes. 12 13 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 14 * TestWebKitAPI/Tests/WebKit2/DidRemoveFrameFromHiearchyInPageCache.cpp: Added. 15 (TestWebKitAPI::didFinishLoadForFrame): 16 (TestWebKitAPI::setPageLoaderClient): 17 (TestWebKitAPI::didReceivePageMessageFromInjectedBundle): 18 (TestWebKitAPI::setInjectedBundleClient): 19 (TestWebKitAPI::TEST): 20 * TestWebKitAPI/Tests/WebKit2/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp: Added. 21 (TestWebKitAPI::didRemoveFrameFromHierarchyCallback): 22 (TestWebKitAPI::DidRemoveFrameFromHiearchyInPageCacheTest::DidRemoveFrameFromHiearchyInPageCacheTest): 23 (TestWebKitAPI::DidRemoveFrameFromHiearchyInPageCacheTest::didCreatePage): 24 * TestWebKitAPI/Tests/WebKit2/many-iframes.html: Added. 25 1 26 2016-10-07 Emanuele Aina <emanuele.aina@collabora.com> 2 27 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r206829 r206922 435 435 A57A34F216AF6B2B00C2501F /* PageVisibilityStateWithWindowChanges.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = A57A34F116AF69E200C2501F /* PageVisibilityStateWithWindowChanges.html */; }; 436 436 A5E2027515B21F6E00C13E14 /* WindowlessWebViewWithMedia.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = A5E2027015B2180600C13E14 /* WindowlessWebViewWithMedia.html */; }; 437 AD57AC201DA7465000FF1BDE /* DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD57AC1E1DA7464D00FF1BDE /* DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp */; }; 438 AD57AC211DA7465B00FF1BDE /* DidRemoveFrameFromHiearchyInPageCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD57AC1F1DA7464D00FF1BDE /* DidRemoveFrameFromHiearchyInPageCache.cpp */; }; 439 AD57AC221DA7466E00FF1BDE /* many-iframes.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = AD57AC1D1DA7463800FF1BDE /* many-iframes.html */; }; 437 440 ADCEBBA61D9AE229002E283A /* Consume.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADCEBBA51D99D4CF002E283A /* Consume.cpp */; }; 438 441 B55AD1D5179F3B3000AC1494 /* PreventImageLoadWithAutoResizing_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B55AD1D3179F3ABF00AC1494 /* PreventImageLoadWithAutoResizing_Bundle.cpp */; }; … … 555 558 dstSubfolderSpec = 7; 556 559 files = ( 560 AD57AC221DA7466E00FF1BDE /* many-iframes.html in Copy Resources */, 557 561 F415086D1DA040C50044BE9B /* play-audio-on-click.html in Copy Resources */, 558 562 F4F137921D9B683E002BEC57 /* large-video-test-now-playing.html in Copy Resources */, … … 1068 1072 A5E2027215B2181900C13E14 /* WindowlessWebViewWithMedia.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WindowlessWebViewWithMedia.mm; sourceTree = "<group>"; }; 1069 1073 A7A966DA140ECCC8005EF9B4 /* CheckedArithmeticOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckedArithmeticOperations.cpp; sourceTree = "<group>"; }; 1074 AD57AC1D1DA7463800FF1BDE /* many-iframes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "many-iframes.html"; sourceTree = "<group>"; }; 1075 AD57AC1E1DA7464D00FF1BDE /* DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp; sourceTree = "<group>"; }; 1076 AD57AC1F1DA7464D00FF1BDE /* DidRemoveFrameFromHiearchyInPageCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DidRemoveFrameFromHiearchyInPageCache.cpp; sourceTree = "<group>"; }; 1070 1077 ADCEBBA51D99D4CF002E283A /* Consume.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Consume.cpp; sourceTree = "<group>"; }; 1071 1078 B4039F9C15E6D8B3007255D6 /* MathExtras.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathExtras.cpp; sourceTree = "<group>"; }; … … 1629 1636 isa = PBXGroup; 1630 1637 children = ( 1638 AD57AC1E1DA7464D00FF1BDE /* DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp */, 1639 AD57AC1F1DA7464D00FF1BDE /* DidRemoveFrameFromHiearchyInPageCache.cpp */, 1631 1640 0F139E741A423A4600F590F5 /* cocoa */, 1632 1641 C0C5D3BB14598B6F00A802A6 /* mac */, … … 1827 1836 2DD7D3AE178227AC0026E1E3 /* lots-of-text-vertical-lr.html */, 1828 1837 930AD401150698B30067970F /* lots-of-text.html */, 1838 AD57AC1D1DA7463800FF1BDE /* many-iframes.html */, 1829 1839 51CD1C711B38D48400142CA5 /* modal-alerts-in-new-about-blank-window.html */, 1830 1840 7A1458FB1AD5C03500E06772 /* mouse-button-listener.html */, … … 2428 2438 7CCE7EC71A411A7E00447C4C /* PageVisibilityStateWithWindowChanges.mm in Sources */, 2429 2439 7CCE7F091A411AE600447C4C /* ParentFrame.cpp in Sources */, 2440 AD57AC211DA7465B00FF1BDE /* DidRemoveFrameFromHiearchyInPageCache.cpp in Sources */, 2430 2441 7C83E0511D0A641800FEBCF3 /* ParsedContentRange.cpp in Sources */, 2431 2442 7CCE7F0A1A411AE600447C4C /* PasteboardNotifications.mm in Sources */, … … 2593 2604 0F139E791A42457000F590F5 /* PlatformUtilitiesCocoa.mm in Sources */, 2594 2605 BC575BE0126F590D006F0F12 /* PlatformUtilitiesMac.mm in Sources */, 2606 AD57AC201DA7465000FF1BDE /* DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp in Sources */, 2595 2607 B55AD1D5179F3B3000AC1494 /* PreventImageLoadWithAutoResizing_Bundle.cpp in Sources */, 2596 2608 C0BD669F131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.