OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 ASSERT(event->type() == eventNames().successEvent || event->type() == eventN
ames().errorEvent || event->type() == eventNames().blockedEvent); | 371 ASSERT(event->type() == eventNames().successEvent || event->type() == eventN
ames().errorEvent || event->type() == eventNames().blockedEvent); |
372 bool dontPreventDefault = IDBEventDispatcher::dispatch(event.get(), targets)
; | 372 bool dontPreventDefault = IDBEventDispatcher::dispatch(event.get(), targets)
; |
373 | 373 |
374 // If the result was of type IDBCursor, or a onBlocked event, then we'll fir
e again. | 374 // If the result was of type IDBCursor, or a onBlocked event, then we'll fir
e again. |
375 if (event->type() != eventNames().blockedEvent && (!cursorToNotify || m_curs
orFinished)) | 375 if (event->type() != eventNames().blockedEvent && (!cursorToNotify || m_curs
orFinished)) |
376 m_requestFinished = true; | 376 m_requestFinished = true; |
377 | 377 |
378 if (cursorToNotify) | 378 if (cursorToNotify) |
379 cursorToNotify->postSuccessHandlerCallback(); | 379 cursorToNotify->postSuccessHandlerCallback(); |
380 | 380 |
381 if (m_transaction) { | 381 if (m_transaction && event->type() != eventNames().blockedEvent) { |
382 // If an error event and the default wasn't prevented... | 382 // If an error event and the default wasn't prevented... |
383 if (dontPreventDefault && event->type() == eventNames().errorEvent) | 383 if (dontPreventDefault && event->type() == eventNames().errorEvent) |
384 m_transaction->backend()->abort(); | 384 m_transaction->backend()->abort(); |
385 m_transaction->backend()->didCompleteTaskEvents(); | 385 m_transaction->backend()->didCompleteTaskEvents(); |
386 } | 386 } |
387 return dontPreventDefault; | 387 return dontPreventDefault; |
388 } | 388 } |
389 | 389 |
390 void IDBRequest::uncaughtExceptionInEventHandler() | 390 void IDBRequest::uncaughtExceptionInEventHandler() |
391 { | 391 { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 m_result = IDBAny::create(prpCursor); | 425 m_result = IDBAny::create(prpCursor); |
426 return; | 426 return; |
427 } | 427 } |
428 | 428 |
429 m_result = IDBAny::create(IDBCursorWithValue::fromCursor(prpCursor)); | 429 m_result = IDBAny::create(IDBCursorWithValue::fromCursor(prpCursor)); |
430 } | 430 } |
431 | 431 |
432 } // namespace WebCore | 432 } // namespace WebCore |
433 | 433 |
434 #endif | 434 #endif |
OLD | NEW |