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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 const AtomicString& IDBRequest::interfaceName() const | 414 const AtomicString& IDBRequest::interfaceName() const |
415 { | 415 { |
416 return EventTargetNames::IDBRequest; | 416 return EventTargetNames::IDBRequest; |
417 } | 417 } |
418 | 418 |
419 ExecutionContext* IDBRequest::executionContext() const | 419 ExecutionContext* IDBRequest::executionContext() const |
420 { | 420 { |
421 return ActiveDOMObject::executionContext(); | 421 return ActiveDOMObject::executionContext(); |
422 } | 422 } |
423 | 423 |
424 bool IDBRequest::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) | 424 bool IDBRequest::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event) |
425 { | 425 { |
426 IDB_TRACE("IDBRequest::dispatchEvent"); | 426 IDB_TRACE("IDBRequest::dispatchEvent"); |
427 if (m_contextStopped || !executionContext()) | 427 if (m_contextStopped || !executionContext()) |
428 return false; | 428 return false; |
429 ASSERT(m_readyState == PENDING); | 429 ASSERT(m_readyState == PENDING); |
430 ASSERT(m_hasPendingActivity); | 430 ASSERT(m_hasPendingActivity); |
431 ASSERT(m_enqueuedEvents.size()); | 431 ASSERT(m_enqueuedEvents.size()); |
432 ASSERT(event->target() == this); | 432 ASSERT(event->target() == this); |
433 | 433 |
434 ScriptState::Scope scope(m_scriptState.get()); | 434 ScriptState::Scope scope(m_scriptState.get()); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 | 541 |
542 void IDBRequest::dequeueEvent(Event* event) | 542 void IDBRequest::dequeueEvent(Event* event) |
543 { | 543 { |
544 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 544 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
545 if (m_enqueuedEvents[i].get() == event) | 545 if (m_enqueuedEvents[i].get() == event) |
546 m_enqueuedEvents.remove(i); | 546 m_enqueuedEvents.remove(i); |
547 } | 547 } |
548 } | 548 } |
549 | 549 |
550 } // namespace blink | 550 } // namespace blink |
OLD | NEW |