Changeset 94812 in webkit
- Timestamp:
- Sep 8, 2011 3:45:12 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r94811 r94812 1 2011-09-08 Brian Weinstein <bweinstein@apple.com> 2 3 WebKit2: Assertion when calling didPerform*Redirect on null source/destination URL string 4 https://bugs.webkit.org/show_bug.cgi?id=67794 5 <rdar://problem/9892024> 6 7 Don't call didPerformClientRedirect or didPerformServerRedirect when source or destination URL string 8 is empty or null. 9 10 If we call didPerformClientRedirect or didPerformServerRedirect when the source or destination is null, 11 it causes an assert in WKURLCF::WKURLCopyCFURL when we try to convert the WKURLRef into a CFURLRef. 12 13 Reviewed by Brady Eidson. 14 15 * UIProcess/WebContext.cpp: 16 (WebKit::WebContext::didPerformClientRedirect): Return early if the source or destination URL string is empty or null. 17 (WebKit::WebContext::didPerformServerRedirect): Ditto. 18 1 19 2011-09-08 Sam Weinig <sam@webkit.org> 2 20 -
trunk/Source/WebKit2/UIProcess/WebContext.cpp
r94476 r94812 433 433 if (!page) 434 434 return; 435 436 if (sourceURLString.isEmpty() || destinationURLString.isEmpty()) 437 return; 435 438 436 439 WebFrameProxy* frame = m_process->webFrame(frameID); … … 445 448 WebPageProxy* page = m_process->webPage(pageID); 446 449 if (!page) 450 return; 451 452 if (sourceURLString.isEmpty() || destinationURLString.isEmpty()) 447 453 return; 448 454 -
trunk/Tools/ChangeLog
r94803 r94812 1 2011-09-08 Brian Weinstein <bweinstein@apple.com> 2 3 WebKit2: Assertion when calling didPerform*Redirect on null source/destination URL string 4 https://bugs.webkit.org/show_bug.cgi?id=67794 5 <rdar://problem/9892024> 6 7 Add a test that we don't send a didPerformServerRedirect when a load is cancelled from willSendRequest. 8 9 Reviewed by Brady Eidson. 10 11 * TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback.cpp: Added. 12 (TestWebKitAPI::didFinishLoadForFrame): Set flags on whether we've loaded the main frame, iframe, or both. 13 (TestWebKitAPI::didPerformServerRedirect): Set a flag for whether we've performed a server redirect. 14 (TestWebKitAPI::TEST): Set up a WKPageLoaderClient and WKContextHistoryClient, and load simple-iframe.html. 15 Once both frames have loaded (main frame and blocked iframe), make sure that we have never called 16 didPerformServerRedirect. 17 18 * TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp: Added. 19 (TestWebKitAPI::LoadCanceledNoServerRedirectCallbackTest::LoadCanceledNoServerRedirectCallbackTest): Initialize 20 our InjectedBundleTest. 21 (TestWebKitAPI::LoadCanceledNoServerRedirectCallbackTest::willSendRequestForFrame): If we are dealing with a request 22 from the main frame (the main resource in simple-iframe.html), allow it. If not (dealing with the iframe), block 23 the request. 24 (TestWebKitAPI::LoadCanceledNoServerRedirectCallbackTest::didCreatePage): Set up the WKBundlePageResourceLoadClient. 25 26 * TestWebKitAPI/Tests/WebKit2/simple-iframe.html: Added. 27 28 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files. 29 * TestWebKitAPI/win/TestWebKitAPI.vcproj: Ditto. 30 * TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj: Ditto. 31 * TestWebKitAPI/win/copy-resources.cmd: Ditto. 32 1 33 2011-09-08 David Levin <levin@chromium.org> 2 34 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r94488 r94812 18 18 33BE5AF5137B5A6C00705813 /* MouseMoveAfterCrash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33BE5AF4137B5A6C00705813 /* MouseMoveAfterCrash.cpp */; }; 19 19 33BE5AF9137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33BE5AF8137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp */; }; 20 33DC8911141953A300747EF7 /* LoadCanceledNoServerRedirectCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33DC8910141953A300747EF7 /* LoadCanceledNoServerRedirectCallback.cpp */; }; 21 33DC8912141955FE00747EF7 /* simple-iframe.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 33DC890E1419539300747EF7 /* simple-iframe.html */; }; 22 33DC89141419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33DC89131419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp */; }; 20 23 33E79E06137B5FD900E32D99 /* mouse-move-listener.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */; }; 21 24 37200B9213A16230007A4FAD /* VectorReverse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37200B9113A16230007A4FAD /* VectorReverse.cpp */; }; … … 109 112 dstSubfolderSpec = 7; 110 113 files = ( 114 33DC8912141955FE00747EF7 /* simple-iframe.html in Copy Resources */, 111 115 1A9E52C913E65EF4006917F5 /* 18-characters.html in Copy Resources */, 112 116 C07E6CB213FD73930038B22B /* devicePixelRatio.html in Copy Resources */, … … 136 140 33BE5AF4137B5A6C00705813 /* MouseMoveAfterCrash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MouseMoveAfterCrash.cpp; sourceTree = "<group>"; }; 137 141 33BE5AF8137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MouseMoveAfterCrash_Bundle.cpp; sourceTree = "<group>"; }; 142 33DC890E1419539300747EF7 /* simple-iframe.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "simple-iframe.html"; sourceTree = "<group>"; }; 143 33DC8910141953A300747EF7 /* LoadCanceledNoServerRedirectCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadCanceledNoServerRedirectCallback.cpp; sourceTree = "<group>"; }; 144 33DC89131419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadCanceledNoServerRedirectCallback_Bundle.cpp; sourceTree = "<group>"; }; 138 145 33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "mouse-move-listener.html"; sourceTree = "<group>"; }; 139 146 37200B9113A16230007A4FAD /* VectorReverse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VectorReverse.cpp; path = WTF/VectorReverse.cpp; sourceTree = "<group>"; }; … … 340 347 BC575AAC126E83B9006F0F12 /* InjectedBundleBasic.cpp */, 341 348 BC575AAF126E83C8006F0F12 /* InjectedBundleBasic_Bundle.cpp */, 349 33DC8910141953A300747EF7 /* LoadCanceledNoServerRedirectCallback.cpp */, 350 33DC89131419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp */, 342 351 33BE5AF4137B5A6C00705813 /* MouseMoveAfterCrash.cpp */, 343 352 33BE5AF8137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp */, … … 377 386 1ADBEFBC130C6A0100D61D19 /* simple-accelerated-compositing.html */, 378 387 C0ADBE8412FCA6B600D2C129 /* simple-form.html */, 388 33DC890E1419539300747EF7 /* simple-iframe.html */, 379 389 BC909778125571AB00083756 /* simple.html */, 380 390 C02B7882126615410026BF0F /* spacebar-scrolling.html */, … … 571 581 939BA91714103412001A01BD /* DeviceScaleFactorOnBack.mm in Sources */, 572 582 3799AD3A14120A43005EB0C6 /* StringByEvaluatingJavaScriptFromString.mm in Sources */, 583 33DC8911141953A300747EF7 /* LoadCanceledNoServerRedirectCallback.cpp in Sources */, 573 584 ); 574 585 runOnlyForDeploymentPostprocessing = 0; … … 589 600 33BE5AF9137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp in Sources */, 590 601 1AEDE22613E5E7E700E62FE8 /* InjectedBundleControllerMac.mm in Sources */, 602 33DC89141419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp in Sources */, 591 603 ); 592 604 runOnlyForDeploymentPostprocessing = 0; -
trunk/Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj
r94208 r94812 485 485 </File> 486 486 <File 487 RelativePath="..\Tests\WebKit2\LoadCanceledNoServerRedirectCallback.cpp" 488 > 489 </File> 490 <File 487 491 RelativePath="..\Tests\WebKit2\mouse-move-listener.html" 488 492 > … … 518 522 <File 519 523 RelativePath="..\Tests\WebKit2\simple-form.html" 524 > 525 </File> 526 <File 527 RelativePath="..\Tests\WebKit2\simple-iframe.html" 520 528 > 521 529 </File> -
trunk/Tools/TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj
r92128 r94812 421 421 </File> 422 422 <File 423 RelativePath="..\Tests\WebKit2\LoadCanceledNoServerRedirectCallback_Bundle.cpp" 424 > 425 </File> 426 <File 423 427 RelativePath="..\Tests\WebKit2\MouseMoveAfterCrash_Bundle.cpp" 424 428 > -
trunk/Tools/TestWebKitAPI/win/copy-resources.cmd
r86945 r94812 17 17 ..\Tests\WebKit2\simple-accelerated-compositing.html 18 18 ..\Tests\WebKit2\simple-form.html 19 ..\Tests\WebKit2\simple-iframe.html 19 20 ..\Tests\WebKit2\spacebar-scrolling.html 20 21 ) do (
Note: See TracChangeset
for help on using the changeset viewer.