Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(774)

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 { 53 {
54 IDBRequest* request = new IDBRequest(scriptState, source, transaction); 54 IDBRequest* request = new IDBRequest(scriptState, source, transaction);
55 request->suspendIfNeeded(); 55 request->suspendIfNeeded();
56 // Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames ) are not associated with transactions. 56 // Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames ) are not associated with transactions.
57 if (transaction) 57 if (transaction)
58 transaction->registerRequest(request); 58 transaction->registerRequest(request);
59 return request; 59 return request;
60 } 60 }
61 61
62 IDBRequest::IDBRequest(ScriptState* scriptState, IDBAny* source, IDBTransaction* transaction) 62 IDBRequest::IDBRequest(ScriptState* scriptState, IDBAny* source, IDBTransaction* transaction)
63 : ActiveDOMObject(scriptState->getExecutionContext()) 63 : ActiveScriptWrappable(this)
64 , ActiveDOMObject(scriptState->getExecutionContext())
64 , m_transaction(transaction) 65 , m_transaction(transaction)
65 , m_scriptState(scriptState) 66 , m_scriptState(scriptState)
66 , m_source(source) 67 , m_source(source)
67 { 68 {
68 } 69 }
69 70
70 IDBRequest::~IDBRequest() 71 IDBRequest::~IDBRequest()
71 { 72 {
72 ASSERT(m_readyState == DONE || m_readyState == EarlyDeath || !getExecutionCo ntext()); 73 ASSERT(m_readyState == DONE || m_readyState == EarlyDeath || !getExecutionCo ntext());
73 } 74 }
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 531
531 void IDBRequest::dequeueEvent(Event* event) 532 void IDBRequest::dequeueEvent(Event* event)
532 { 533 {
533 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { 534 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
534 if (m_enqueuedEvents[i].get() == event) 535 if (m_enqueuedEvents[i].get() == event)
535 m_enqueuedEvents.remove(i); 536 m_enqueuedEvents.remove(i);
536 } 537 }
537 } 538 }
538 539
539 } // namespace blink 540 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698