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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 ASSERT(m_hasPendingActivity); | 429 ASSERT(m_hasPendingActivity); |
430 ASSERT(m_enqueuedEvents.size()); | 430 ASSERT(m_enqueuedEvents.size()); |
431 ASSERT(event->target() == this); | 431 ASSERT(event->target() == this); |
432 | 432 |
433 ScriptState::Scope scope(m_scriptState.get()); | 433 ScriptState::Scope scope(m_scriptState.get()); |
434 | 434 |
435 if (event->type() != EventTypeNames::blocked) | 435 if (event->type() != EventTypeNames::blocked) |
436 m_readyState = DONE; | 436 m_readyState = DONE; |
437 dequeueEvent(event.get()); | 437 dequeueEvent(event.get()); |
438 | 438 |
439 Vector<RefPtr<EventTarget> > targets; | 439 WillBeHeapVector<RefPtrWillBeMember<EventTarget> > targets; |
440 targets.append(this); | 440 targets.append(this); |
441 if (m_transaction && !m_preventPropagation) { | 441 if (m_transaction && !m_preventPropagation) { |
442 targets.append(m_transaction); | 442 targets.append(m_transaction); |
443 // If there ever are events that are associated with a database but | 443 // If there ever are events that are associated with a database but |
444 // that do not have a transaction, then this will not work and we need | 444 // that do not have a transaction, then this will not work and we need |
445 // this object to actually hold a reference to the database (to ensure | 445 // this object to actually hold a reference to the database (to ensure |
446 // it stays alive). | 446 // it stays alive). |
447 targets.append(m_transaction->db()); | 447 targets.append(m_transaction->db()); |
448 } | 448 } |
449 | 449 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 | 540 |
541 void IDBRequest::dequeueEvent(Event* event) | 541 void IDBRequest::dequeueEvent(Event* event) |
542 { | 542 { |
543 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 543 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
544 if (m_enqueuedEvents[i].get() == event) | 544 if (m_enqueuedEvents[i].get() == event) |
545 m_enqueuedEvents.remove(i); | 545 m_enqueuedEvents.remove(i); |
546 } | 546 } |
547 } | 547 } |
548 | 548 |
549 } // namespace WebCore | 549 } // namespace WebCore |
OLD | NEW |