Changeset 124974 in webkit
- Timestamp:
- Aug 7, 2012, 8:06:22 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r124960 r124974 1 2012-08-07 Joshua Bell <jsbell@chromium.org> 2 3 Layout Test storage/indexeddb/intversion-omit-parameter.html is flaky 4 https://bugs.webkit.org/show_bug.cgi?id=92952 5 6 Reviewed by Tony Chang. 7 8 Remove expectation now that flakiness should be resolved. 9 10 * platform/chromium/TestExpectations: 11 1 12 2012-08-07 Yoshifumi Inoue <yosin@chromium.org> 2 13 -
trunk/LayoutTests/platform/chromium/TestExpectations
r124907 r124974 3462 3462 BUGWK92941 WIN MAC : accessibility/loading-iframe-updates-axtree.html = CRASH PASS 3463 3463 3464 // Flakily crashing after http://trac.webkit.org/changeset/1244023465 BUGWK92952 DEBUG : storage/indexeddb/intversion-omit-parameter.html = CRASH PASS3466 3467 3464 // Tests added by bug 76270. According to bug 92968, they should be skipped in Chromium. 3468 3465 BUGWK92968 SKIP : http/tests/appcache/abort-cache-onchecking-manifest-404.html = PASS -
trunk/Source/WebCore/ChangeLog
r124972 r124974 1 2012-08-07 Joshua Bell <jsbell@chromium.org> 2 3 Layout Test storage/indexeddb/intversion-omit-parameter.html is flaky 4 https://bugs.webkit.org/show_bug.cgi?id=92952 5 6 Reviewed by Tony Chang. 7 8 Account for events being propagated from the back-end to front-end after 9 front-end context is stopped (i.e. document is being destroyed). The IDBRequest 10 lifecycle was tightened up in http://trac.webkit.org/changeset/123275 with more 11 asserts but the stopped state wasn't accounted for. 12 13 Test: [chromium] webkit_unit_tests --gtest_filter='IDBRequestTest.EventsAfterStopping' 14 15 * Modules/indexeddb/IDBRequest.cpp: 16 (WebCore::IDBRequest::abort): 17 (WebCore::IDBRequest::onError): 18 (WebCore::IDBRequest::onSuccess): 19 (WebCore::IDBRequest::onSuccessWithContinuation): 20 1 21 2012-08-07 Kentaro Hara <haraken@chromium.org> 2 22 -
trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp
r124842 r124974 142 142 void IDBRequest::abort() 143 143 { 144 ASSERT(m_readyState == PENDING || m_readyState == DONE);145 144 ASSERT(!m_requestAborted); 146 145 if (m_contextStopped || !scriptExecutionContext()) 147 146 return; 147 ASSERT(m_readyState == PENDING || m_readyState == DONE); 148 148 if (m_readyState == DONE) 149 149 return; … … 211 211 } 212 212 213 void IDBRequest::onError(PassRefPtr<IDBDatabaseError> error) 214 { 213 bool IDBRequest::shouldEnqueueEvent() const 214 { 215 if (m_contextStopped || !scriptExecutionContext()) 216 return false; 215 217 ASSERT(m_readyState == PENDING || m_readyState == DONE); 216 218 if (m_requestAborted) 217 return ;219 return false; 218 220 ASSERT(m_readyState == PENDING); 219 221 ASSERT(!m_errorCode && m_errorMessage.isNull() && !m_error && !m_result); 222 return true; 223 } 224 225 void IDBRequest::onError(PassRefPtr<IDBDatabaseError> error) 226 { 227 IDB_TRACE("IDBRequest::onError()"); 228 if (!shouldEnqueueEvent()) 229 return; 230 220 231 m_errorCode = error->code(); 221 232 m_errorMessage = error->message(); … … 233 244 { 234 245 IDB_TRACE("IDBRequest::onSuccess(DOMStringList)"); 235 ASSERT(m_readyState == PENDING || m_readyState == DONE); 236 if (m_requestAborted) 237 return; 238 ASSERT(m_readyState == PENDING); 239 ASSERT(!m_errorCode && m_errorMessage.isNull() && !m_error && !m_result); 246 if (!shouldEnqueueEvent()) 247 return; 248 240 249 m_result = IDBAny::create(domStringList); 241 250 enqueueEvent(createSuccessEvent()); … … 245 254 { 246 255 IDB_TRACE("IDBRequest::onSuccess(IDBCursor)"); 247 ASSERT(m_readyState == PENDING || m_readyState == DONE); 248 if (m_requestAborted) 249 return; 250 ASSERT(m_readyState == PENDING); 251 ASSERT(!m_errorCode && m_errorMessage.isNull() && !m_error && !m_result); 256 if (!shouldEnqueueEvent()) 257 return; 258 252 259 ASSERT(m_cursorType != IDBCursorBackendInterface::InvalidCursorType); 253 260 RefPtr<IDBCursor> cursor; … … 264 271 { 265 272 IDB_TRACE("IDBRequest::onSuccess(IDBDatabase)"); 266 ASSERT(m_readyState == PENDING || m_readyState == DONE); 267 if (m_requestAborted) 268 return; 269 ASSERT(m_readyState == PENDING); 270 ASSERT(!m_errorCode && m_errorMessage.isNull() && !m_error && !m_result); 271 if (m_contextStopped || !scriptExecutionContext()) 273 if (!shouldEnqueueEvent()) 272 274 return; 273 275 … … 282 284 { 283 285 IDB_TRACE("IDBRequest::onSuccess(IDBKey)"); 284 ASSERT(m_readyState == PENDING || m_readyState == DONE); 285 if (m_requestAborted) 286 return; 287 ASSERT(m_readyState == PENDING); 288 ASSERT(!m_errorCode && m_errorMessage.isNull() && !m_error && !m_result); 286 if (!shouldEnqueueEvent()) 287 return; 288 289 289 if (idbKey && idbKey->isValid()) 290 290 m_result = IDBAny::create(idbKey); … … 297 297 { 298 298 IDB_TRACE("IDBRequest::onSuccess(IDBTransaction)"); 299 ASSERT(m_readyState == PENDING || m_readyState == DONE);300 if (m_requestAborted)301 return;302 ASSERT(m_readyState == PENDING);303 ASSERT(!m_errorCode && m_errorMessage.isNull() && !m_error && !m_result);304 299 RefPtr<IDBTransactionBackendInterface> backend = prpBackend; 305 300 306 301 if (m_contextStopped || !scriptExecutionContext()) { 307 backend->abort(); 308 return; 309 } 302 // Should only be null in tests. 303 if (backend.get()) 304 backend->abort(); 305 return; 306 } 307 if (!shouldEnqueueEvent()) 308 return; 310 309 311 310 RefPtr<IDBTransaction> frontend = IDBTransaction::create(scriptExecutionContext(), backend, IDBTransaction::VERSION_CHANGE, m_source->idbDatabase().get()); … … 323 322 { 324 323 IDB_TRACE("IDBRequest::onSuccess(SerializedScriptValue)"); 325 ASSERT(m_readyState == PENDING || m_readyState == DONE); 326 if (m_requestAborted) 327 return; 328 ASSERT(m_readyState == PENDING); 329 ASSERT(!m_errorCode && m_errorMessage.isNull() && !m_error && !m_result); 324 if (!shouldEnqueueEvent()) 325 return; 326 330 327 m_result = IDBAny::create(serializedScriptValue); 331 328 m_pendingCursor.clear(); … … 348 345 void IDBRequest::onSuccess(PassRefPtr<SerializedScriptValue> prpSerializedScriptValue, PassRefPtr<IDBKey> prpPrimaryKey, const IDBKeyPath& keyPath) 349 346 { 350 if (m_requestAborted) 351 return; 347 IDB_TRACE("IDBRequest::onSuccess(SerializedScriptValue, IDBKey, IDBKeyPath)"); 348 if (!shouldEnqueueEvent()) 349 return; 350 352 351 #ifndef NDEBUG 353 352 ASSERT(keyPath == effectiveObjectStore(m_source)->keyPath()); … … 374 373 { 375 374 IDB_TRACE("IDBRequest::onSuccessWithContinuation"); 376 ASSERT(m_readyState == PENDING || m_readyState == DONE); 377 if (m_requestAborted) 378 return; 379 ASSERT(!m_errorCode && m_errorMessage.isNull() && !m_error && !m_result); 375 if (!shouldEnqueueEvent()) 376 return; 377 380 378 ASSERT(m_pendingCursor); 381 379 setResultCursor(m_pendingCursor.release()); -
trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h
r124842 r124974 115 115 116 116 private: 117 bool shouldEnqueueEvent() const; 118 117 119 // EventTarget 118 120 virtual void refEventTarget() { ref(); } -
trunk/Source/WebKit/chromium/ChangeLog
r124954 r124974 1 2012-08-07 Joshua Bell <jsbell@chromium.org> 2 3 Layout Test storage/indexeddb/intversion-omit-parameter.html is flaky 4 https://bugs.webkit.org/show_bug.cgi?id=92952 5 6 Reviewed by Tony Chang. 7 8 Added test to exercise WebCore::IDBRequest event callbacks after 9 the script context has stopped and ensure no asserts are hit. 10 11 * WebKit.gypi: 12 * tests/IDBRequestTest.cpp: Added. 13 (WebCore): 14 (WebCore::TEST): 15 1 16 2012-08-07 Fady Samuel <fsamuel@chromium.org> 2 17 -
trunk/Source/WebKit/chromium/WebKit.gypi
r124839 r124974 119 119 'tests/IDBKeyPathTest.cpp', 120 120 'tests/IDBLevelDBCodingTest.cpp', 121 'tests/IDBRequestTest.cpp', 121 122 'tests/ImageLayerChromiumTest.cpp', 122 123 'tests/KeyboardTest.cpp',
Note:
See TracChangeset
for help on using the changeset viewer.