Changeset 57520 in webkit
- Timestamp:
- Apr 13, 2010 10:08:32 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r57519 r57520 1 2010-04-13 Jeremy Moskovich <jeremy@chromium.org> 2 3 Reviewed by David Levin. 4 5 Add some diagnostics to try to track down cause of crash in ArchiveFactory::isArchiveMimeType(). 6 7 https://bugs.webkit.org/show_bug.cgi?id=36426 8 9 No new tests as there is no new functionality. 10 11 * loader/FrameLoader.cpp: 12 (WebCore::FrameLoader::finishedLoadingDocument): Make copy of mimeType string to isolate crash. 13 1 14 2010-04-13 Abhishek Arya <inferno@chromium.org> 2 15 -
trunk/WebCore/loader/FrameLoader.cpp
r57469 r57520 2871 2871 2872 2872 // If loading a webarchive, run through webarchive machinery 2873 #if PLATFORM(CHROMIUM) 2874 // https://bugs.webkit.org/show_bug.cgi?id=36426 2875 // FIXME: For debugging purposes, should be removed before closing the bug. 2876 // Make real copy of the string so we fail here if the responseMIMEType 2877 // string is bad. 2878 const String responseMIMEType = loader->responseMIMEType(); 2879 #else 2873 2880 const String& responseMIMEType = loader->responseMIMEType(); 2881 #endif 2874 2882 2875 2883 // FIXME: Mac's FrameLoaderClient::finishedLoading() method does work that is required even with Archive loads -
trunk/WebKit/chromium/ChangeLog
r57508 r57520 1 2010-04-13 Jeremy Moskovich <jeremy@chromium.org> 2 3 Reviewed by David Levin. 4 5 Add some diagnostics to try to track down cause of crash in ArchiveFactory::isArchiveMimeType(). 6 7 https://bugs.webkit.org/show_bug.cgi?id=36426 8 9 * src/ResourceHandle.cpp: Track state across ResourceHandle invocations. 10 (WebCore::ResourceHandleInternal::ResourceHandleInternal): 11 (WebCore::ResourceHandleInternal::): 12 (WebCore::ResourceHandleInternal::start): 13 (WebCore::ResourceHandleInternal::cancel): 14 (WebCore::ResourceHandleInternal::didReceiveResponse): 15 (WebCore::ResourceHandleInternal::didReceiveData): 16 (WebCore::ResourceHandleInternal::didFinishLoading): 17 (WebCore::ResourceHandleInternal::didFail): 18 1 19 2010-04-13 Mikhail Naganov <mnaganov@chromium.org> 2 20 -
trunk/WebKit/chromium/src/ResourceHandle.cpp
r56469 r57520 58 58 , m_owner(0) 59 59 , m_client(client) 60 , m_state(ConnectionStateNew) 60 61 { 61 62 } … … 75 76 virtual void didFail(WebURLLoader*, const WebURLError&); 76 77 78 enum ConnectionState { 79 ConnectionStateNew, 80 ConnectionStateStarted, 81 ConnectionStateReceivedResponse, 82 ConnectionStateReceivingData, 83 ConnectionStateFinishedLoading, 84 ConnectionStateCanceled, 85 ConnectionStateFailed, 86 }; 87 77 88 ResourceRequest m_request; 78 89 ResourceHandle* m_owner; 79 90 ResourceHandleClient* m_client; 80 91 OwnPtr<WebURLLoader> m_loader; 92 93 // Used for sanity checking to make sure we don't experience illegal state 94 // transitions. 95 ConnectionState m_state; 81 96 }; 82 97 83 98 void ResourceHandleInternal::start() 84 99 { 100 if (m_state != ConnectionStateNew) 101 CRASH(); 102 m_state = ConnectionStateStarted; 103 85 104 m_loader.set(webKitClient()->createURLLoader()); 86 105 ASSERT(m_loader.get()); … … 93 112 void ResourceHandleInternal::cancel() 94 113 { 114 m_state = ConnectionStateCanceled; 95 115 m_loader->cancel(); 96 116 … … 129 149 ASSERT(m_client); 130 150 ASSERT(!response.isNull()); 151 bool isMultipart = response.isMultipartPayload(); 152 bool isValidStateTransition = (m_state == ConnectionStateStarted || m_state == ConnectionStateReceivedResponse); 153 // In the case of multipart loads, calls to didReceiveData & didReceiveResponse can be interleaved. 154 if (!isMultipart && !isValidStateTransition) 155 CRASH(); 156 m_state = ConnectionStateReceivedResponse; 131 157 m_client->didReceiveResponse(m_owner, response.toResourceResponse()); 132 158 } … … 136 162 { 137 163 ASSERT(m_client); 164 if (m_state != ConnectionStateReceivedResponse && m_state != ConnectionStateReceivingData) 165 CRASH(); 166 m_state = ConnectionStateReceivingData; 138 167 139 168 // FIXME(yurys): it looks like lengthReceived is always the same as … … 146 175 { 147 176 ASSERT(m_client); 177 if (m_state != ConnectionStateReceivedResponse && m_state != ConnectionStateReceivingData) 178 CRASH(); 179 m_state = ConnectionStateFinishedLoading; 148 180 m_client->didFinishLoading(m_owner); 149 181 } … … 152 184 { 153 185 ASSERT(m_client); 186 m_state = ConnectionStateFailed; 154 187 m_client->didFail(m_owner, error); 155 188 }
Note: See TracChangeset
for help on using the changeset viewer.