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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBDatabase.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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const char IDBDatabase::databaseClosedErrorMessage[] = "The database connection is closed."; 67 const char IDBDatabase::databaseClosedErrorMessage[] = "The database connection is closed.";
68 68
69 IDBDatabase* IDBDatabase::create(ExecutionContext* context, PassOwnPtr<WebIDBDat abase> database, IDBDatabaseCallbacks* callbacks) 69 IDBDatabase* IDBDatabase::create(ExecutionContext* context, PassOwnPtr<WebIDBDat abase> database, IDBDatabaseCallbacks* callbacks)
70 { 70 {
71 IDBDatabase* idbDatabase = new IDBDatabase(context, database, callbacks); 71 IDBDatabase* idbDatabase = new IDBDatabase(context, database, callbacks);
72 idbDatabase->suspendIfNeeded(); 72 idbDatabase->suspendIfNeeded();
73 return idbDatabase; 73 return idbDatabase;
74 } 74 }
75 75
76 IDBDatabase::IDBDatabase(ExecutionContext* context, PassOwnPtr<WebIDBDatabase> b ackend, IDBDatabaseCallbacks* callbacks) 76 IDBDatabase::IDBDatabase(ExecutionContext* context, PassOwnPtr<WebIDBDatabase> b ackend, IDBDatabaseCallbacks* callbacks)
77 : ActiveDOMObject(context) 77 : ActiveScriptWrappable(this)
78 , ActiveDOMObject(context)
78 , m_backend(backend) 79 , m_backend(backend)
79 , m_databaseCallbacks(callbacks) 80 , m_databaseCallbacks(callbacks)
80 { 81 {
81 m_databaseCallbacks->connect(this); 82 m_databaseCallbacks->connect(this);
82 } 83 }
83 84
84 IDBDatabase::~IDBDatabase() 85 IDBDatabase::~IDBDatabase()
85 { 86 {
86 if (!m_closePending && m_backend) 87 if (!m_closePending && m_backend)
87 m_backend->close(); 88 m_backend->close();
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 return ActiveDOMObject::getExecutionContext(); 446 return ActiveDOMObject::getExecutionContext();
446 } 447 }
447 448
448 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) 449 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method)
449 { 450 {
450 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, apiCallsHistogram, new EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", IDBMethodsMax)); 451 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, apiCallsHistogram, new EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", IDBMethodsMax));
451 apiCallsHistogram.count(method); 452 apiCallsHistogram.count(method);
452 } 453 }
453 454
454 } // namespace blink 455 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698