Changeset 169006 in webkit
- Timestamp:
- May 17, 2014, 10:29:36 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r168996 r169006 1 2014-05-17 Alexey Proskuryakov <ap@apple.com> 2 3 REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache 4 https://bugs.webkit.org/show_bug.cgi?id=133007 5 <rdar://problem/13702706> 6 7 appcache tests often fail on the Mac WebKit2 bot 8 https://bugs.webkit.org/show_bug.cgi?id=82061 9 10 Reviewed by Maciej Stachowiak. 11 12 * platform/mac-wk2/TestExpectations: Let's enable all the appcache tests (except 13 for a couple that fail), and see what happens on bots. I don't see any reason 14 why WebKit2 would be any more flaky than WebKit1 here. 15 1 16 2014-05-17 Piotr Grad <p.grad@samsung.com> 2 17 -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r168577 r169006 178 178 fast/events/drag-link.html 179 179 180 # appcache tests often fail on the Mac WebKit2 bot181 # https://bugs.webkit.org/show_bug.cgi?id=82061 rdar://problem/11108649182 http/tests/appcache183 184 180 # flaky storage tests 185 181 # https://bugs.webkit.org/show_bug.cgi?id=82679 … … 356 352 webkit.org/b/132100 fast/forms/hidpi-textarea-on-subpixel-position.html [ ImageOnlyFailure ] 357 353 354 webkit.org/b/93980 http/tests/appcache/load-from-appcache-defer-resume-crash.html [ Skip ] 355 358 356 ### END OF (1) Classified failures with bug reports 359 357 ######################################## … … 376 374 editing/spelling/spelling-insert-html.html 377 375 editing/spelling/spelling-marker-description.html 376 377 # This test times out, likely because appcache still loads in WebProcess, not NetworkProcess 378 http/tests/appcache/auth.html [ Skip ] 378 379 379 380 ### END OF (2) Classified failures without bug reports (yet) -
trunk/Source/WebCore/ChangeLog
r169004 r169006 1 2014-05-17 Alexey Proskuryakov <ap@apple.com> 2 3 REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache 4 https://bugs.webkit.org/show_bug.cgi?id=133007 5 <rdar://problem/13702706> 6 7 appcache tests often fail on the Mac WebKit2 bot 8 https://bugs.webkit.org/show_bug.cgi?id=82061 9 10 Reviewed by Maciej Stachowiak. 11 12 Covered by existing tests, which this patch enables. 13 14 * WebCore.exp.in: Export ResourceLoader::cancel(const ResourceError&). It used 15 to be virtual, but marking subclasses final has resulted in the compiler calling 16 it directly from WebKitLegacy framework. Seeing that no subclass overrides it, 17 I then made it non-virtual. 18 Also export ApplicationCacheHost functions that are now used from WebKit2. 19 20 * loader/ResourceLoader.h: Made the class abstract (as I didn't realize at first 21 that it's always either a SubresourceLoader or a NetscapePlugInStreamLoader). 22 Made ResourceHandleClient functions private, as they should never be called other 23 than via a ResourceHandleClient pointer. 24 25 * loader/NetscapePlugInStreamLoader.h: 26 * loader/SubresourceLoader.h: 27 Marked these final. 28 29 * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSwitchToSubstituteResource): 30 Added a function to be called when switching to a substitute resource. We still 31 need a ResourceLoader at this point, as substitute resource will be delivered through 32 it, but we don't want it to continue its current load. 33 34 * loader/appcache/ApplicationCacheHost.cpp: 35 (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache): 36 Call the ResourceLoader function instead of using handle, which is null when 37 using out of process networking. 38 1 39 2014-05-17 Andreas Kling <akling@apple.com> 2 40 -
trunk/Source/WebCore/WebCore.exp.in
r168994 r169006 378 378 __ZN7WebCore14ResourceLoader14cancelledErrorEv 379 379 __ZN7WebCore14ResourceLoader32didCancelAuthenticationChallengeERKNS_23AuthenticationChallengeE 380 __ZN7WebCore14ResourceLoader6cancelERKNS_13ResourceErrorE 380 381 __ZN7WebCore14ResourceLoader6cancelEv 381 382 __ZN7WebCore14SQLiteDatabase11tableExistsERKN3WTF6StringE … … 825 826 __ZN7WebCore19toInt32EnforceRangeEPN3JSC9ExecStateENS0_7JSValueE 826 827 __ZN7WebCore20ApplicationCacheHost17maybeLoadResourceEPNS_14ResourceLoaderERKNS_15ResourceRequestERKNS_3URLE 828 __ZN7WebCore20ApplicationCacheHost25maybeLoadFallbackForErrorEPNS_14ResourceLoaderERKNS_13ResourceErrorE 829 __ZN7WebCore20ApplicationCacheHost28maybeLoadFallbackForResponseEPNS_14ResourceLoaderERKNS_16ResourceResponseE 830 __ZN7WebCore20ApplicationCacheHost28maybeLoadFallbackForRedirectEPNS_14ResourceLoaderERNS_15ResourceRequestERKNS_16ResourceResponseE 827 831 __ZN7WebCore20CachedResourceLoader31garbageCollectDocumentResourcesEv 828 832 __ZN7WebCore20DictationAlternativeC1Ejjy -
trunk/Source/WebCore/loader/NetscapePlugInStreamLoader.h
r165676 r169006 49 49 }; 50 50 51 class NetscapePlugInStreamLoader : public ResourceLoader {51 class NetscapePlugInStreamLoader final : public ResourceLoader { 52 52 public: 53 53 static PassRefPtr<NetscapePlugInStreamLoader> create(Frame*, NetscapePlugInStreamLoaderClient*, const ResourceRequest&); -
trunk/Source/WebCore/loader/ResourceLoader.cpp
r167635 r169006 208 208 } 209 209 210 void ResourceLoader::willSwitchToSubstituteResource() 211 { 212 ASSERT(!m_documentLoader->isSubstituteLoadPending(this)); 213 platformStrategies()->loaderStrategy()->resourceLoadScheduler()->remove(this); 214 if (m_handle) 215 m_handle->cancel(); 216 } 210 217 211 218 void ResourceLoader::addDataOrBuffer(const char* data, unsigned length, SharedBuffer* buffer, DataPayloadType dataPayloadType) -
trunk/Source/WebCore/loader/ResourceLoader.h
r167207 r169006 56 56 class ResourceLoader : public RefCounted<ResourceLoader>, protected ResourceHandleClient { 57 57 public: 58 virtual ~ResourceLoader() ;58 virtual ~ResourceLoader() = 0; 59 59 60 60 void cancel(); … … 70 70 71 71 virtual const ResourceRequest& iOSOriginalRequest() const { return request(); } 72 virtual RetainPtr<CFDictionaryRef> connectionProperties(ResourceHandle*) override;73 72 #endif 74 73 … … 77 76 const ResourceRequest& originalRequest() const { return m_originalRequest; } 78 77 79 v irtual void cancel(const ResourceError&);78 void cancel(const ResourceError&); 80 79 ResourceError cancelledError(); 81 80 ResourceError blockedError(); … … 114 113 #endif 115 114 virtual void receivedCancellation(const AuthenticationChallenge&); 115 116 const URL& url() const { return m_request.url(); } 117 ResourceHandle* handle() const { return m_handle.get(); } 118 bool shouldSendResourceLoadCallbacks() const { return m_options.sendLoadCallbacks == SendCallbacks; } 119 void setSendCallbackPolicy(SendCallbackPolicy sendLoadCallbacks) { m_options.sendLoadCallbacks = sendLoadCallbacks; } 120 bool shouldSniffContent() const { return m_options.sniffContent == SniffContent; } 121 ClientCredentialPolicy clientCredentialPolicy() const { return m_options.clientCredentialPolicy; } 122 123 bool reachedTerminalState() const { return m_reachedTerminalState; } 124 125 const ResourceRequest& request() const { return m_request; } 126 127 void setDataBufferingPolicy(DataBufferingPolicy); 128 129 void willSwitchToSubstituteResource(); 130 131 #if PLATFORM(MAC) 132 void schedule(WTF::SchedulePair&); 133 void unschedule(WTF::SchedulePair&); 134 #endif 135 136 protected: 137 ResourceLoader(Frame*, ResourceLoaderOptions); 138 139 friend class ResourceLoadScheduler; // for access to start() 140 // start() actually sends the load to the network (unless the load is being 141 // deferred) and should only be called by ResourceLoadScheduler or setDefersLoading(). 142 void start(); 143 144 void didFinishLoadingOnePart(double finishTime); 145 void cleanupForError(const ResourceError&); 146 147 bool wasCancelled() const { return m_cancellationStatus >= Cancelled; } 148 149 void didReceiveDataOrBuffer(const char*, unsigned, PassRefPtr<SharedBuffer>, long long encodedDataLength, DataPayloadType); 150 151 const ResourceLoaderOptions& options() { return m_options; } 152 153 RefPtr<ResourceHandle> m_handle; 154 RefPtr<Frame> m_frame; 155 RefPtr<DocumentLoader> m_documentLoader; 156 ResourceResponse m_response; 157 158 private: 159 virtual void willCancel(const ResourceError&) = 0; 160 virtual void didCancel(const ResourceError&) = 0; 161 162 void addDataOrBuffer(const char*, unsigned, SharedBuffer*, DataPayloadType); 116 163 117 164 // ResourceHandleClient … … 125 172 virtual void wasBlocked(ResourceHandle*) override; 126 173 virtual void cannotShowURL(ResourceHandle*) override; 174 #if USE(NETWORK_CFDATA_ARRAY_CALLBACK) 175 virtual void didReceiveDataArray(ResourceHandle*, CFArrayRef dataArray) override; 176 #endif 127 177 virtual bool shouldUseCredentialStorage(ResourceHandle*) override { return shouldUseCredentialStorage(); } 128 178 virtual void didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge& challenge) override { didReceiveAuthenticationChallenge(challenge); } 129 179 virtual void didCancelAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge& challenge) override { didCancelAuthenticationChallenge(challenge); } 130 virtual void receivedCancellation(ResourceHandle*, const AuthenticationChallenge& challenge) override { receivedCancellation(challenge); }131 132 #if USE(NETWORK_CFDATA_ARRAY_CALLBACK)133 virtual void didReceiveDataArray(ResourceHandle*, CFArrayRef dataArray) override;134 #endif135 136 180 #if USE(PROTECTION_SPACE_AUTH_CALLBACK) 137 181 virtual bool canAuthenticateAgainstProtectionSpace(ResourceHandle*, const ProtectionSpace& protectionSpace) override { return canAuthenticateAgainstProtectionSpace(protectionSpace); } 138 182 #endif 139 183 virtual void receivedCancellation(ResourceHandle*, const AuthenticationChallenge& challenge) override { receivedCancellation(challenge); } 184 #if PLATFORM(COCOA) && !USE(CFNETWORK) 185 virtual NSCachedURLResponse* willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override; 186 #endif 140 187 #if PLATFORM(COCOA) && USE(CFNETWORK) 141 188 virtual CFCachedURLResponseRef willCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override; 142 189 #endif 143 190 #if PLATFORM(IOS) 191 virtual RetainPtr<CFDictionaryRef> connectionProperties(ResourceHandle*) override; 192 #endif 144 193 #if PLATFORM(WIN) && USE(CFNETWORK) 145 194 // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>. 146 195 virtual bool shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override; 147 196 #endif 148 149 #if PLATFORM(COCOA) && !USE(CFNETWORK)150 virtual NSCachedURLResponse* willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override;151 #endif152 153 197 #if USE(QUICK_LOOK) 154 198 virtual void didCreateQuickLookHandle(QuickLookHandle&) override; 155 199 #endif 156 157 const URL& url() const { return m_request.url(); }158 ResourceHandle* handle() const { return m_handle.get(); }159 bool shouldSendResourceLoadCallbacks() const { return m_options.sendLoadCallbacks == SendCallbacks; }160 void setSendCallbackPolicy(SendCallbackPolicy sendLoadCallbacks) { m_options.sendLoadCallbacks = sendLoadCallbacks; }161 bool shouldSniffContent() const { return m_options.sniffContent == SniffContent; }162 ClientCredentialPolicy clientCredentialPolicy() const { return m_options.clientCredentialPolicy; }163 164 bool reachedTerminalState() const { return m_reachedTerminalState; }165 166 const ResourceRequest& request() const { return m_request; }167 168 void setDataBufferingPolicy(DataBufferingPolicy);169 170 #if PLATFORM(MAC)171 void schedule(WTF::SchedulePair&);172 void unschedule(WTF::SchedulePair&);173 #endif174 175 protected:176 ResourceLoader(Frame*, ResourceLoaderOptions);177 178 friend class ResourceLoadScheduler; // for access to start()179 // start() actually sends the load to the network (unless the load is being180 // deferred) and should only be called by ResourceLoadScheduler or setDefersLoading().181 void start();182 183 void didFinishLoadingOnePart(double finishTime);184 void cleanupForError(const ResourceError&);185 186 bool wasCancelled() const { return m_cancellationStatus >= Cancelled; }187 188 void didReceiveDataOrBuffer(const char*, unsigned, PassRefPtr<SharedBuffer>, long long encodedDataLength, DataPayloadType);189 190 const ResourceLoaderOptions& options() { return m_options; }191 192 RefPtr<ResourceHandle> m_handle;193 RefPtr<Frame> m_frame;194 RefPtr<DocumentLoader> m_documentLoader;195 ResourceResponse m_response;196 197 private:198 virtual void willCancel(const ResourceError&) = 0;199 virtual void didCancel(const ResourceError&) = 0;200 201 void addDataOrBuffer(const char*, unsigned, SharedBuffer*, DataPayloadType);202 200 203 201 ResourceRequest m_request; -
trunk/Source/WebCore/loader/SubresourceLoader.h
r165676 r169006 43 43 class ResourceRequest; 44 44 45 class SubresourceLoader : public ResourceLoader {45 class SubresourceLoader final : public ResourceLoader { 46 46 public: 47 47 static PassRefPtr<SubresourceLoader> create(Frame*, CachedResource*, const ResourceRequest&, const ResourceLoaderOptions&); -
trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp
r166847 r169006 400 400 return false; 401 401 402 loader->willSwitchToSubstituteResource(); 403 402 404 m_documentLoader->m_pendingSubstituteResources.set(loader, resource); 403 405 m_documentLoader->deliverSubstituteResourcesAfterDelay(); 404 405 loader->handle()->cancel();406 406 407 407 return true; -
trunk/Source/WebKit2/ChangeLog
r169003 r169006 1 2014-05-17 Alexey Proskuryakov <ap@apple.com> 2 3 REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache 4 https://bugs.webkit.org/show_bug.cgi?id=133007 5 <rdar://problem/13702706> 6 7 appcache tests often fail on the Mac WebKit2 bot 8 https://bugs.webkit.org/show_bug.cgi?id=82061 9 10 Reviewed by Maciej Stachowiak. 11 12 * WebProcess/Network/WebResourceLoader.cpp: 13 (WebKit::WebResourceLoader::willSendRequest): 14 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): 15 (WebKit::WebResourceLoader::didFailResourceLoad): 16 Perform the same appcache checks that ResourceHandleClient implementation in ResourceLoader 17 does. We should eventually come up with a way to share the code. Perhaps add a class that 18 isolates ResourceLoader from networking details? But ResourceLoader was itself supposed 19 to be the class that isolates DocumentLoader from networking details. So, unsure. 20 1 21 2014-05-17 Jae Hyun Park <jaepark@webkit.org> 2 22 -
trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp
r167894 r169006 36 36 #include "WebErrors.h" 37 37 #include "WebProcess.h" 38 #include <WebCore/ApplicationCacheHost.h> 38 39 #include <WebCore/CertificateInfo.h> 39 40 #include <WebCore/DocumentLoader.h> … … 85 86 86 87 Ref<WebResourceLoader> protect(*this); 87 88 88 89 ResourceRequest newRequest = proposedRequest; 90 if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForRedirect(m_coreLoader.get(), newRequest, redirectResponse)) 91 return; 89 92 m_coreLoader->willSendRequest(newRequest, redirectResponse); 90 93 … … 121 124 responseCopy.setSoupMessageTLSErrors(certificateInfo.tlsErrors()); 122 125 #endif 126 if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForResponse(m_coreLoader.get(), responseCopy)) 127 return; 123 128 m_coreLoader->didReceiveResponse(responseCopy); 124 129 … … 164 169 m_quickLookHandle->didFail(); 165 170 #endif 171 if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForError(m_coreLoader.get(), error)) 172 return; 166 173 m_coreLoader->didFail(error); 167 174 }
Note:
See TracChangeset
for help on using the changeset viewer.