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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 // Keep track of enqueued events in case we need to abort prior to dispatch, | 547 // Keep track of enqueued events in case we need to abort prior to dispatch, |
548 // in which case these must be cancelled. If the events not dispatched for | 548 // in which case these must be cancelled. If the events not dispatched for |
549 // other reasons they must be removed from this list via dequeueEvent(). | 549 // other reasons they must be removed from this list via dequeueEvent(). |
550 if (eventQueue->enqueueEvent(event)) | 550 if (eventQueue->enqueueEvent(event)) |
551 m_enqueuedEvents.push_back(event); | 551 m_enqueuedEvents.push_back(event); |
552 } | 552 } |
553 | 553 |
554 void IDBRequest::dequeueEvent(Event* event) { | 554 void IDBRequest::dequeueEvent(Event* event) { |
555 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 555 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
556 if (m_enqueuedEvents[i].get() == event) | 556 if (m_enqueuedEvents[i].get() == event) |
557 m_enqueuedEvents.remove(i); | 557 m_enqueuedEvents.erase(i); |
558 } | 558 } |
559 } | 559 } |
560 | 560 |
561 } // namespace blink | 561 } // namespace blink |
OLD | NEW |