Changeset 56453 in webkit
- Timestamp:
- Mar 24, 2010 1:20:32 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r56452 r56453 1 2010-03-24 Jeremy Moskovich <jeremy@chromium.org> 2 3 Reviewed by Jeremy Orlow. 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-03-24 Anton Muhin <antonm@chromium.org> 2 15 -
trunk/WebCore/loader/FrameLoader.cpp
r56352 r56453 2813 2813 2814 2814 // If loading a webarchive, run through webarchive machinery 2815 #if PLATFORM(CHROMIUM) 2816 // https://bugs.webkit.org/show_bug.cgi?id=36426 2817 // FIXME: jeremy@chromium.org - for debugging purposes, should be removed 2818 // before closing the bug. 2819 // Make real copy of the string so we fail here if the responseMIMEType 2820 // string is bad. 2821 const String responseMIMEType = loader->responseMIMEType(); 2822 #else 2815 2823 const String& responseMIMEType = loader->responseMIMEType(); 2824 #endif 2816 2825 2817 2826 // FIXME: Mac's FrameLoaderClient::finishedLoading() method does work that is required even with Archive loads -
trunk/WebKit/chromium/ChangeLog
r56449 r56453 1 2010-03-24 Jeremy Moskovich <jeremy@chromium.org> 2 3 Reviewed by Jeremy Orlow. 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-03-24 Jay Campan <jcampan@google.com> 2 20 -
trunk/WebKit/chromium/src/ResourceHandle.cpp
r55695 r56453 58 58 , m_owner(0) 59 59 , m_client(client) 60 , m_state(CONNECTION_STATE_NEW) 60 61 { 61 62 } … … 75 76 virtual void didFail(WebURLLoader*, const WebURLError&); 76 77 78 enum ConnectionState { 79 CONNECTION_STATE_NEW, 80 CONNECTION_STATE_STARTED, 81 CONNECTION_STATE_RECEIVED_RESPONSE, 82 CONNECTION_STATE_RECEIVING_DATA, 83 CONNECTION_STATE_FINISHED_LOADING, 84 CONNECTION_STATE_CANCELED, 85 CONNECTION_STATE_FAILED, 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 == CONNECTION_STATE_NEW)) 101 CRASH(); 102 m_state = CONNECTION_STATE_STARTED; 103 85 104 m_loader.set(webKitClient()->createURLLoader()); 86 105 ASSERT(m_loader.get()); … … 93 112 void ResourceHandleInternal::cancel() 94 113 { 114 m_state = CONNECTION_STATE_CANCELED; 95 115 m_loader->cancel(); 96 116 … … 129 149 ASSERT(m_client); 130 150 ASSERT(!response.isNull()); 151 if (!(m_state == CONNECTION_STATE_STARTED)) 152 CRASH(); 153 m_state = CONNECTION_STATE_RECEIVED_RESPONSE; 131 154 m_client->didReceiveResponse(m_owner, response.toResourceResponse()); 132 155 } … … 136 159 { 137 160 ASSERT(m_client); 161 if (!(m_state == CONNECTION_STATE_RECEIVED_RESPONSE 162 || m_state == CONNECTION_STATE_RECEIVING_DATA)) 163 CRASH(); 164 m_state = CONNECTION_STATE_RECEIVING_DATA; 138 165 139 166 // FIXME(yurys): it looks like lengthReceived is always the same as … … 146 173 { 147 174 ASSERT(m_client); 175 if (!(m_state == CONNECTION_STATE_RECEIVED_RESPONSE 176 || m_state == CONNECTION_STATE_RECEIVING_DATA)) 177 CRASH(); 178 m_state = CONNECTION_STATE_FINISHED_LOADING; 148 179 m_client->didFinishLoading(m_owner); 149 180 } … … 152 183 { 153 184 ASSERT(m_client); 185 m_state = CONNECTION_STATE_FAILED; 154 186 m_client->didFail(m_owner, error); 155 187 }
Note: See TracChangeset
for help on using the changeset viewer.