Changeset 91189 in webkit
- Timestamp:
- Jul 18, 2011 9:48:32 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r91187 r91189 1 2011-07-18 Yi Shen <yi.4.shen@nokia.com> 2 3 [Qt] ASSERTION FAILED in ResourceHandle::setDefersLoading causes crash 4 https://bugs.webkit.org/show_bug.cgi?id=62808 5 6 Added a test for the crash occurs when load deferring is turned off. 7 8 Reviewed by Benjamin Poulain. 9 10 * loader/load-defer-resume-crash-expected.txt: Added. 11 * loader/load-defer-resume-crash.html: Added. 12 * loader/resources/images.html: Added. 13 * platform/chromium/test_expectations.txt: Skip this test since the LayoutTestController::setDefersLoading is not implemented for chromium. 14 1 15 2011-07-18 Young Han Lee <joybro@company100.net> 2 16 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r91186 r91189 161 161 // Unskip after implementing LayoutTestController::setDefersLoading and ::goBack. 162 162 BUGWK60877 SKIP : loader/navigation-while-deferring-loads.html = FAIL 163 BUGWK60877 SKIP : loader/load-defer-resume-crash.html = FAIL 163 164 164 165 // Skipped until new WebSocket protocol is implemented. -
trunk/Source/WebCore/ChangeLog
r91187 r91189 1 2011-07-18 Yi Shen <yi.4.shen@nokia.com> 2 3 [Qt] ASSERTION FAILED in ResourceHandle::setDefersLoading causes crash 4 https://bugs.webkit.org/show_bug.cgi?id=62808 5 6 The assertion in ResourceHandle::setDefersLoading assumes asynchronous 7 content delivery -- To resume a page, first, its main resource loader 8 calls setDefersLoading to resume loading the main content; then all the 9 sub-resource loaders calls setDefersLoading to resume sub-contents. 10 However, since QNetworkReplyHandler delivers content synchronously, 11 some new sub-resource loaders get created as soon as the main resource 12 loader resumed, and all these new sub-resource loaders set their 13 defersLoading flag to false. Then, the assertion fails for these new 14 sub-resource loaders when calling setDefersLoading on them. As a fix, 15 this path makes QNetworkReplyHandler deliver content asynchronously 16 when its load type is set to SynchronousLoad. 17 18 Reviewed by Benjamin Poulain. 19 20 Test: loader/load-defer-resume-crash.html 21 22 * platform/network/qt/QNetworkReplyHandler.cpp: 23 (WebCore::QNetworkReplyHandlerCallQueue::setDeferSignals): 24 * platform/network/qt/QNetworkReplyHandler.h: 25 (WebCore::QNetworkReplyHandler::setLoadingDeferred): 26 1 27 2011-07-18 Young Han Lee <joybro@company100.net> 2 28 -
trunk/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
r90784 r91189 179 179 } 180 180 181 void QNetworkReplyHandlerCallQueue::setDeferSignals(bool defer )181 void QNetworkReplyHandlerCallQueue::setDeferSignals(bool defer, bool sync) 182 182 { 183 183 m_deferSignals = defer; 184 flush(); 184 if (sync) 185 flush(); 186 else 187 QMetaObject::invokeMethod(this, "flush", Qt::QueuedConnection); 185 188 } 186 189 -
trunk/Source/WebCore/platform/network/qt/QNetworkReplyHandler.h
r90784 r91189 42 42 class QNetworkReplyHandler; 43 43 44 class QNetworkReplyHandlerCallQueue { 44 class QNetworkReplyHandlerCallQueue : public QObject { 45 Q_OBJECT 45 46 public: 46 47 QNetworkReplyHandlerCallQueue(QNetworkReplyHandler*, bool deferSignals); 47 48 bool deferSignals() const { return m_deferSignals; } 48 void setDeferSignals(bool );49 void setDeferSignals(bool, bool sync = false); 49 50 50 51 typedef void (QNetworkReplyHandler::*EnqueuedCall)(); … … 61 62 QList<EnqueuedCall> m_enqueuedCalls; 62 63 63 void flush();64 Q_INVOKABLE void flush(); 64 65 }; 65 66 … … 121 122 122 123 QNetworkReplyHandler(ResourceHandle*, LoadType, bool deferred = false); 123 void setLoadingDeferred(bool deferred) { m_queue.setDeferSignals(deferred ); }124 void setLoadingDeferred(bool deferred) { m_queue.setDeferSignals(deferred, m_loadType == SynchronousLoad); } 124 125 125 126 QNetworkReply* reply() const { return m_replyWrapper ? m_replyWrapper->reply() : 0; }
Note: See TracChangeset
for help on using the changeset viewer.