Changeset 176574 in webkit
- Timestamp:
- Nov 29, 2014, 1:12:55 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
-
Source/WebKit2/ChangeLog (modified) (1 diff)
-
Source/WebKit2/UIProcess/Storage/StorageManager.cpp (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/PlatformWebView.h (modified) (1 diff)
-
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (modified) (9 diffs)
-
Tools/TestWebKitAPI/Tests/WebKit2/CloseFromWithinCreatePage.cpp (added)
-
Tools/TestWebKitAPI/Tests/WebKit2/close-from-within-create-page.html (added)
-
Tools/TestWebKitAPI/mac/PlatformWebViewMac.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r176570 r176574 1 2014-11-29 Anders Carlsson <andersca@apple.com> 2 3 Crash when calling WKPageClose on the originated page from within createNewPage callback 4 https://bugs.webkit.org/show_bug.cgi?id=139099 5 <rdar://problem/19052564> 6 7 Reviewed by Sam Weinig. 8 9 Null check the namespace ID. 10 11 * UIProcess/Storage/StorageManager.cpp: 12 (WebKit::StorageManager::cloneSessionStorageNamespaceInternal): 13 1 14 2014-11-28 Tim Horton <timothy_horton@apple.com> 2 15 -
trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp
r170774 r176574 582 582 { 583 583 SessionStorageNamespace* sessionStorageNamespace = m_sessionStorageNamespaces.get(storageNamespaceID); 584 ASSERT(sessionStorageNamespace); 584 if (!sessionStorageNamespace) { 585 // FIXME: We can get into this situation if someone closes the originating page from within a 586 // createNewPage callback. We bail for now, but we should really find a way to keep the session storage alive 587 // so we we'll clone the session storage correctly. 588 return; 589 } 585 590 586 591 SessionStorageNamespace* newSessionStorageNamespace = m_sessionStorageNamespaces.get(newStorageNamespaceID); -
trunk/Tools/ChangeLog
r176567 r176574 1 2014-11-29 Anders Carlsson <andersca@apple.com> 2 3 Crash when calling WKPageClose on the originated page from within createNewPage callback 4 https://bugs.webkit.org/show_bug.cgi?id=139099 5 <rdar://problem/19052564> 6 7 Reviewed by Sam Weinig. 8 9 Add a test. 10 11 * TestWebKitAPI/PlatformWebView.h: 12 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 13 * TestWebKitAPI/Tests/WebKit2/CloseFromWithinCreatePage.cpp: Added. 14 (TestWebKitAPI::runJavaScriptAlert): 15 (TestWebKitAPI::createNewPage): 16 (TestWebKitAPI::TEST): 17 * TestWebKitAPI/Tests/WebKit2/close-from-within-create-page.html: Added. 18 * TestWebKitAPI/mac/PlatformWebViewMac.mm: 19 (TestWebKitAPI::PlatformWebView::PlatformWebView): 20 1 21 2014-11-28 Commit Queue <commit-queue@webkit.org> 2 22 -
trunk/Tools/TestWebKitAPI/PlatformWebView.h
r173126 r176574 53 53 class PlatformWebView { 54 54 public: 55 PlatformWebView(WKContextRef, WKPageGroupRef = 0); 55 explicit PlatformWebView(WKContextRef, WKPageGroupRef = 0); 56 explicit PlatformWebView(WKPageRef relatedPage); 56 57 ~PlatformWebView(); 57 58 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r176011 r176574 19 19 1A02C84F125D4A8400E3F4BD /* Find.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A02C84E125D4A8400E3F4BD /* Find.cpp */; }; 20 20 1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A02C84B125D4A5E00E3F4BD /* find.html */; }; 21 1A50AA1E1A2A4E7000F4C345 /* CloseFromWithinCreatePage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A50AA1C1A2A4E7000F4C345 /* CloseFromWithinCreatePage.cpp */; }; 22 1A50AA201A2A51FC00F4C345 /* close-from-within-create-page.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A50AA1F1A2A4EA500F4C345 /* close-from-within-create-page.html */; }; 21 23 1A5FEFDD1270E2A3000E2921 /* EvaluateJavaScript.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */; }; 22 24 1A63479F183D72A4005B1707 /* all-content-in-one-iframe.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93D3D19B17B1A7B000C7C415 /* all-content-in-one-iframe.html */; }; … … 148 150 93ABA80916DDAB91002DB2FA /* StringHasher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93ABA80816DDAB91002DB2FA /* StringHasher.cpp */; }; 149 151 93AF4ECE1506F064007FD57E /* NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93AF4ECD1506F064007FD57E /* NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp */; }; 150 93AF4ED01506F123007FD57E /* lots-of-images.html in Resources */ = {isa = PBXBuildFile; fileRef = 93AF4ECF1506F123007FD57E /* lots-of-images.html */; };151 152 93AF4ED11506F130007FD57E /* lots-of-images.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93AF4ECF1506F123007FD57E /* lots-of-images.html */; }; 152 93D3D19C17B1A7B000C7C415 /* all-content-in-one-iframe.html in Resources */ = {isa = PBXBuildFile; fileRef = 93D3D19B17B1A7B000C7C415 /* all-content-in-one-iframe.html */; };153 153 93D3D19E17B1A84200C7C415 /* LayoutMilestonesWithAllContentInFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D19D17B1A84200C7C415 /* LayoutMilestonesWithAllContentInFrame.cpp */; }; 154 154 93F1DB3114DA20760024C362 /* NewFirstVisuallyNonEmptyLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F1DB3014DA20760024C362 /* NewFirstVisuallyNonEmptyLayout.cpp */; }; … … 307 307 51E5C7031919C3B200D8B3E1 /* simple3.html in Copy Resources */, 308 308 290A9BB91735F63800D71BBC /* OpenNewWindow.html in Copy Resources */, 309 1A50AA201A2A51FC00F4C345 /* close-from-within-create-page.html in Copy Resources */, 309 310 290F4275172A221C00939FF0 /* custom-protocol-sync-xhr.html in Copy Resources */, 310 311 C2CF975B16CEC71B0054E99D /* JSContextBackForwardCache1.html in Copy Resources */, … … 377 378 1A02C84B125D4A5E00E3F4BD /* find.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = find.html; sourceTree = "<group>"; }; 378 379 1A02C84E125D4A8400E3F4BD /* Find.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Find.cpp; sourceTree = "<group>"; }; 380 1A50AA1C1A2A4E7000F4C345 /* CloseFromWithinCreatePage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CloseFromWithinCreatePage.cpp; sourceTree = "<group>"; }; 381 1A50AA1F1A2A4EA500F4C345 /* close-from-within-create-page.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "close-from-within-create-page.html"; sourceTree = "<group>"; }; 379 382 1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvaluateJavaScript.cpp; sourceTree = "<group>"; }; 380 383 1A7BFC0A171A0BDB00BC5F64 /* WillSendSubmitEvent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WillSendSubmitEvent.mm; sourceTree = "<group>"; }; … … 842 845 isa = PBXGroup; 843 846 children = ( 844 4A410F4B19AF7BD6002EBAB5 /* UserMedia.cpp */,845 847 C0C5D3BB14598B6F00A802A6 /* mac */, 846 848 BC90977B125571AE00083756 /* Resources */, 847 849 BC246D8C132F115A00B56D7C /* AboutBlankLoad.cpp */, 848 850 7C8DDAA91735DE1D00EA5AC0 /* CloseThenTerminate.cpp */, 851 1A50AA1C1A2A4E7000F4C345 /* CloseFromWithinCreatePage.cpp */, 849 852 BC246D98132F1FE100B56D7C /* CanHandleRequest.cpp */, 850 853 BC246D97132F1FE100B56D7C /* CanHandleRequest_Bundle.cpp */, … … 916 919 C02B77F1126612140026BF0F /* SpacebarScrolling.cpp */, 917 920 1AE72F47173EB214006362F0 /* TerminateTwice.cpp */, 921 4A410F4B19AF7BD6002EBAB5 /* UserMedia.cpp */, 918 922 BC22D31314DC689800FFB1DD /* UserMessage.cpp */, 919 923 BC22D31714DC68B800FFB1DD /* UserMessage_Bundle.cpp */, … … 981 985 F6B7BE9617469B7E008A3445 /* associate-form-controls.html */, 982 986 76E182DE15475A8300F1FADD /* auto-submitting-form.html */, 987 1A50AA1F1A2A4EA500F4C345 /* close-from-within-create-page.html */, 983 988 290F4274172A1FDE00939FF0 /* custom-protocol-sync-xhr.html */, 984 989 C5E1AFFD16B22179006CC1F2 /* execCopy.html */, … … 1249 1254 buildActionMask = 2147483647; 1250 1255 files = ( 1251 93D3D19C17B1A7B000C7C415 /* all-content-in-one-iframe.html in Resources */,1252 93AF4ED01506F123007FD57E /* lots-of-images.html in Resources */,1253 1256 ); 1254 1257 runOnlyForDeploymentPostprocessing = 0; … … 1413 1416 290F4278172A232C00939FF0 /* CustomProtocolsSyncXHRTest.mm in Sources */, 1414 1417 C08587BF13FE956C001EF4E5 /* WebKitAgnosticTest.mm in Sources */, 1418 1A50AA1E1A2A4E7000F4C345 /* CloseFromWithinCreatePage.cpp in Sources */, 1415 1419 51FBBB4D1513D4E900822738 /* WebViewCanPasteURL.mm in Sources */, 1416 1420 37E38C34169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm in Sources */, -
trunk/Tools/TestWebKitAPI/mac/PlatformWebViewMac.mm
r171199 r176574 50 50 NSRect rect = NSMakeRect(0, 0, 800, 600); 51 51 m_view = [[WKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef]; 52 [m_view setWindowOcclusionDetectionEnabled:NO]; 53 54 NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000); 55 m_window = [[ActiveOffscreenWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]; 56 [m_window setColorSpace:[[NSScreen mainScreen] colorSpace]]; 57 [[m_window contentView] addSubview:m_view]; 58 [m_window orderBack:nil]; 59 [m_window setAutodisplay:NO]; 60 [m_window setReleasedWhenClosed:NO]; 61 } 62 63 PlatformWebView::PlatformWebView(WKPageRef relatedPage) 64 { 65 NSRect rect = NSMakeRect(0, 0, 800, 600); 66 m_view = [[WKView alloc] initWithFrame:rect contextRef:WKPageGetContext(relatedPage) pageGroupRef:WKPageGetPageGroup(relatedPage) relatedToPage:relatedPage]; 52 67 [m_view setWindowOcclusionDetectionEnabled:NO]; 53 68
Note:
See TracChangeset
for help on using the changeset viewer.