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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.h

Issue 1909813002: Enable per thread heap for database thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2013 Apple 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 67
68 void closeDatabasesImmediately(SecurityOrigin*, const String& name); 68 void closeDatabasesImmediately(SecurityOrigin*, const String& name);
69 69
70 using DatabaseCallback = Function<void(Database*)>; 70 using DatabaseCallback = Function<void(Database*)>;
71 void forEachOpenDatabaseInPage(Page*, std::unique_ptr<DatabaseCallback>); 71 void forEachOpenDatabaseInPage(Page*, std::unique_ptr<DatabaseCallback>);
72 72
73 void prepareToOpenDatabase(Database*); 73 void prepareToOpenDatabase(Database*);
74 void failedToOpenDatabase(Database*); 74 void failedToOpenDatabase(Database*);
75 75
76 private: 76 private:
77 using DatabaseSet = HashSet<UntracedMember<Database>>; 77 using DatabaseSet = HashSet<CrossThreadPersistent<Database>>;
78 using DatabaseNameMap = HashMap<String, DatabaseSet*>; 78 using DatabaseNameMap = HashMap<String, DatabaseSet*>;
79 using DatabaseOriginMap = HashMap<String, DatabaseNameMap*>; 79 using DatabaseOriginMap = HashMap<String, DatabaseNameMap*>;
80 class CloseOneDatabaseImmediatelyTask; 80 class CloseOneDatabaseImmediatelyTask;
81 81
82 DatabaseTracker(); 82 DatabaseTracker();
83 83
84 void closeOneDatabaseImmediately(const String& originIdentifier, const Strin g& name, Database*); 84 void closeOneDatabaseImmediately(const String& originIdentifier, const Strin g& name, Database*);
85 85
86 Mutex m_openDatabaseMapGuard; 86 Mutex m_openDatabaseMapGuard;
87 87
88 // This map contains untraced pointers to a garbage-collected class. We can' t
89 // make this traceable because it is updated by multiple database threads.
90 // See http://crbug.com/417990
91 mutable OwnPtr<DatabaseOriginMap> m_openDatabaseMap; 88 mutable OwnPtr<DatabaseOriginMap> m_openDatabaseMap;
92 }; 89 };
93 90
94 } // namespace blink 91 } // namespace blink
95 92
96 #endif // DatabaseTracker_h 93 #endif // DatabaseTracker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698