| 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 483     bool dontPreventDefault = IDBEventDispatcher::dispatch(event.get(), targets)
     ; | 483     bool dontPreventDefault = IDBEventDispatcher::dispatch(event.get(), targets)
     ; | 
| 484 | 484 | 
| 485     if (m_transaction) { | 485     if (m_transaction) { | 
| 486         if (m_readyState == DONE) | 486         if (m_readyState == DONE) | 
| 487             m_transaction->unregisterRequest(this); | 487             m_transaction->unregisterRequest(this); | 
| 488 | 488 | 
| 489         // Possibly abort the transaction. This must occur after unregistering (
     so this request | 489         // Possibly abort the transaction. This must occur after unregistering (
     so this request | 
| 490         // doesn't receive a second error) and before deactivating (which might 
     trigger commit). | 490         // doesn't receive a second error) and before deactivating (which might 
     trigger commit). | 
| 491         if (event->type() == eventNames().errorEvent && dontPreventDefault && !m
     _requestAborted) { | 491         if (event->type() == eventNames().errorEvent && dontPreventDefault && !m
     _requestAborted) { | 
| 492             m_transaction->setError(m_error); | 492             m_transaction->setError(m_error); | 
| 493             m_transaction->abort(IGNORE_EXCEPTION_STATE); | 493             m_transaction->abort(IGNORE_EXCEPTION); | 
| 494         } | 494         } | 
| 495 | 495 | 
| 496         // If this was the last request in the transaction's list, it may commit
      here. | 496         // If this was the last request in the transaction's list, it may commit
      here. | 
| 497         if (setTransactionActive) | 497         if (setTransactionActive) | 
| 498             m_transaction->setActive(false); | 498             m_transaction->setActive(false); | 
| 499     } | 499     } | 
| 500 | 500 | 
| 501     if (cursorToNotify) | 501     if (cursorToNotify) | 
| 502         cursorToNotify->postSuccessHandlerCallback(); | 502         cursorToNotify->postSuccessHandlerCallback(); | 
| 503 | 503 | 
| 504     if (m_readyState == DONE && (!cursorToNotify || m_cursorFinished) && event->
     type() != eventNames().upgradeneededEvent) | 504     if (m_readyState == DONE && (!cursorToNotify || m_cursorFinished) && event->
     type() != eventNames().upgradeneededEvent) | 
| 505         m_hasPendingActivity = false; | 505         m_hasPendingActivity = false; | 
| 506 | 506 | 
| 507     return dontPreventDefault; | 507     return dontPreventDefault; | 
| 508 } | 508 } | 
| 509 | 509 | 
| 510 void IDBRequest::uncaughtExceptionInEventHandler() | 510 void IDBRequest::uncaughtExceptionInEventHandler() | 
| 511 { | 511 { | 
| 512     if (m_transaction && !m_requestAborted) { | 512     if (m_transaction && !m_requestAborted) { | 
| 513         m_transaction->setError(DOMError::create(AbortError, "Uncaught exception
      in event handler.")); | 513         m_transaction->setError(DOMError::create(AbortError, "Uncaught exception
      in event handler.")); | 
| 514         m_transaction->abort(IGNORE_EXCEPTION_STATE); | 514         m_transaction->abort(IGNORE_EXCEPTION); | 
| 515     } | 515     } | 
| 516 } | 516 } | 
| 517 | 517 | 
| 518 void IDBRequest::transactionDidFinishAndDispatch() | 518 void IDBRequest::transactionDidFinishAndDispatch() | 
| 519 { | 519 { | 
| 520     ASSERT(m_transaction); | 520     ASSERT(m_transaction); | 
| 521     ASSERT(m_transaction->isVersionChange()); | 521     ASSERT(m_transaction->isVersionChange()); | 
| 522     ASSERT(m_readyState == DONE); | 522     ASSERT(m_readyState == DONE); | 
| 523     ASSERT(scriptExecutionContext()); | 523     ASSERT(scriptExecutionContext()); | 
| 524     m_transaction.clear(); | 524     m_transaction.clear(); | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 545 { | 545 { | 
| 546     return &m_eventTargetData; | 546     return &m_eventTargetData; | 
| 547 } | 547 } | 
| 548 | 548 | 
| 549 EventTargetData* IDBRequest::ensureEventTargetData() | 549 EventTargetData* IDBRequest::ensureEventTargetData() | 
| 550 { | 550 { | 
| 551     return &m_eventTargetData; | 551     return &m_eventTargetData; | 
| 552 } | 552 } | 
| 553 | 553 | 
| 554 } // namespace WebCore | 554 } // namespace WebCore | 
| OLD | NEW | 
|---|