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

Side by Side Diff: Source/modules/indexeddb/IDBDatabase.cpp

Issue 1162203003: Add use counters to determine the fate of DOMStringList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | Source/modules/indexeddb/IDBDatabase.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 15 matching lines...) Expand all
26 #include "config.h" 26 #include "config.h"
27 #include "modules/indexeddb/IDBDatabase.h" 27 #include "modules/indexeddb/IDBDatabase.h"
28 28
29 #include "bindings/core/v8/ExceptionState.h" 29 #include "bindings/core/v8/ExceptionState.h"
30 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 30 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
31 #include "bindings/core/v8/Nullable.h" 31 #include "bindings/core/v8/Nullable.h"
32 #include "bindings/core/v8/SerializedScriptValue.h" 32 #include "bindings/core/v8/SerializedScriptValue.h"
33 #include "bindings/modules/v8/V8BindingForModules.h" 33 #include "bindings/modules/v8/V8BindingForModules.h"
34 #include "core/dom/ExecutionContext.h" 34 #include "core/dom/ExecutionContext.h"
35 #include "core/events/EventQueue.h" 35 #include "core/events/EventQueue.h"
36 #include "core/frame/UseCounter.h"
36 #include "core/inspector/ScriptCallStack.h" 37 #include "core/inspector/ScriptCallStack.h"
37 #include "modules/indexeddb/IDBAny.h" 38 #include "modules/indexeddb/IDBAny.h"
38 #include "modules/indexeddb/IDBEventDispatcher.h" 39 #include "modules/indexeddb/IDBEventDispatcher.h"
39 #include "modules/indexeddb/IDBHistograms.h" 40 #include "modules/indexeddb/IDBHistograms.h"
40 #include "modules/indexeddb/IDBIndex.h" 41 #include "modules/indexeddb/IDBIndex.h"
41 #include "modules/indexeddb/IDBKeyPath.h" 42 #include "modules/indexeddb/IDBKeyPath.h"
42 #include "modules/indexeddb/IDBTracing.h" 43 #include "modules/indexeddb/IDBTracing.h"
43 #include "modules/indexeddb/IDBVersionChangeEvent.h" 44 #include "modules/indexeddb/IDBVersionChangeEvent.h"
44 #include "modules/indexeddb/WebIDBDatabaseCallbacksImpl.h" 45 #include "modules/indexeddb/WebIDBDatabaseCallbacksImpl.h"
45 #include "public/platform/Platform.h" 46 #include "public/platform/Platform.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 IDB_TRACE("IDBDatabase::transaction"); 271 IDB_TRACE("IDBDatabase::transaction");
271 Platform::current()->histogramEnumeration("WebCore.IndexedDB.FrontEndAPICall s", IDBTransactionCall, IDBMethodsMax); 272 Platform::current()->histogramEnumeration("WebCore.IndexedDB.FrontEndAPICall s", IDBTransactionCall, IDBMethodsMax);
272 273
273 HashSet<String> scope; 274 HashSet<String> scope;
274 if (storeNames.isString()) { 275 if (storeNames.isString()) {
275 scope.add(storeNames.getAsString()); 276 scope.add(storeNames.getAsString());
276 } else if (storeNames.isStringSequence()) { 277 } else if (storeNames.isStringSequence()) {
277 for (const String& name : storeNames.getAsStringSequence()) 278 for (const String& name : storeNames.getAsStringSequence())
278 scope.add(name); 279 scope.add(name);
279 } else if (storeNames.isDOMStringList()) { 280 } else if (storeNames.isDOMStringList()) {
281 UseCounter::count(executionContext(), UseCounter::IDBDatabaseTransaction StoreNamesIsDOMStringList);
jsbell 2015/06/05 18:12:17 This won't tell us anything useful. Given that use
philipj_slow 2015/06/05 18:19:22 You're right, that sounds pretty useless, so I'll
280 const Vector<String>& list = *storeNames.getAsDOMStringList(); 282 const Vector<String>& list = *storeNames.getAsDOMStringList();
281 for (const String& name : list) 283 for (const String& name : list)
282 scope.add(name); 284 scope.add(name);
283 } else { 285 } else {
284 ASSERT_NOT_REACHED(); 286 ASSERT_NOT_REACHED();
285 } 287 }
286 288
287 if (scope.isEmpty()) { 289 if (scope.isEmpty()) {
288 exceptionState.throwDOMException(InvalidAccessError, "The storeNames par ameter was empty."); 290 exceptionState.throwDOMException(InvalidAccessError, "The storeNames par ameter was empty.");
289 return nullptr; 291 return nullptr;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 { 455 {
454 return EventTargetNames::IDBDatabase; 456 return EventTargetNames::IDBDatabase;
455 } 457 }
456 458
457 ExecutionContext* IDBDatabase::executionContext() const 459 ExecutionContext* IDBDatabase::executionContext() const
458 { 460 {
459 return ActiveDOMObject::executionContext(); 461 return ActiveDOMObject::executionContext();
460 } 462 }
461 463
462 } // namespace blink 464 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | Source/modules/indexeddb/IDBDatabase.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698