| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 const AtomicString& IDBTransaction::interfaceName() const | 331 const AtomicString& IDBTransaction::interfaceName() const |
| 332 { | 332 { |
| 333 return EventTargetNames::IDBTransaction; | 333 return EventTargetNames::IDBTransaction; |
| 334 } | 334 } |
| 335 | 335 |
| 336 ExecutionContext* IDBTransaction::executionContext() const | 336 ExecutionContext* IDBTransaction::executionContext() const |
| 337 { | 337 { |
| 338 return ActiveDOMObject::executionContext(); | 338 return ActiveDOMObject::executionContext(); |
| 339 } | 339 } |
| 340 | 340 |
| 341 bool IDBTransaction::dispatchEvent(PassRefPtr<Event> event) | 341 bool IDBTransaction::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) |
| 342 { | 342 { |
| 343 IDB_TRACE("IDBTransaction::dispatchEvent"); | 343 IDB_TRACE("IDBTransaction::dispatchEvent"); |
| 344 if (m_contextStopped || !executionContext()) { | 344 if (m_contextStopped || !executionContext()) { |
| 345 m_state = Finished; | 345 m_state = Finished; |
| 346 return false; | 346 return false; |
| 347 } | 347 } |
| 348 ASSERT(m_state != Finished); | 348 ASSERT(m_state != Finished); |
| 349 ASSERT(m_hasPendingActivity); | 349 ASSERT(m_hasPendingActivity); |
| 350 ASSERT(executionContext()); | 350 ASSERT(executionContext()); |
| 351 ASSERT(event->target() == this); | 351 ASSERT(event->target() == this); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 379 void IDBTransaction::stop() | 379 void IDBTransaction::stop() |
| 380 { | 380 { |
| 381 if (m_contextStopped) | 381 if (m_contextStopped) |
| 382 return; | 382 return; |
| 383 | 383 |
| 384 m_contextStopped = true; | 384 m_contextStopped = true; |
| 385 | 385 |
| 386 abort(IGNORE_EXCEPTION); | 386 abort(IGNORE_EXCEPTION); |
| 387 } | 387 } |
| 388 | 388 |
| 389 void IDBTransaction::enqueueEvent(PassRefPtr<Event> event) | 389 void IDBTransaction::enqueueEvent(PassRefPtrWillBeRawPtr<Event> event) |
| 390 { | 390 { |
| 391 ASSERT_WITH_MESSAGE(m_state != Finished, "A finished transaction tried to en
queue an event of type %s.", event->type().utf8().data()); | 391 ASSERT_WITH_MESSAGE(m_state != Finished, "A finished transaction tried to en
queue an event of type %s.", event->type().utf8().data()); |
| 392 if (m_contextStopped || !executionContext()) | 392 if (m_contextStopped || !executionContext()) |
| 393 return; | 393 return; |
| 394 | 394 |
| 395 EventQueue* eventQueue = executionContext()->eventQueue(); | 395 EventQueue* eventQueue = executionContext()->eventQueue(); |
| 396 event->setTarget(this); | 396 event->setTarget(this); |
| 397 eventQueue->enqueueEvent(event); | 397 eventQueue->enqueueEvent(event); |
| 398 } | 398 } |
| 399 | 399 |
| 400 blink::WebIDBDatabase* IDBTransaction::backendDB() const | 400 blink::WebIDBDatabase* IDBTransaction::backendDB() const |
| 401 { | 401 { |
| 402 return m_database->backend(); | 402 return m_database->backend(); |
| 403 } | 403 } |
| 404 | 404 |
| 405 } // namespace WebCore | 405 } // namespace WebCore |
| OLD | NEW |