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

Side by Side Diff: Source/modules/webdatabase/DatabaseContext.h

Issue 201083003: Oilpan: Prepare to move DatabaseThread and SQLTransactionCoordinator to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google, Inc. All Rights Reserved. 3 * Copyright (C) 2011 Google, Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 bool allowDatabaseAccess() const; 68 bool allowDatabaseAccess() const;
69 69
70 SecurityOrigin* securityOrigin() const; 70 SecurityOrigin* securityOrigin() const;
71 bool isContextThread() const; 71 bool isContextThread() const;
72 72
73 private: 73 private:
74 explicit DatabaseContext(ExecutionContext*); 74 explicit DatabaseContext(ExecutionContext*);
75 75
76 void stopSyncDatabases(); 76 void stopSyncDatabases();
77 77
78 RefPtr<DatabaseThread> m_databaseThread; 78 RefPtrWillBePersistent<DatabaseThread> m_databaseThread;
Mads Ager (chromium) 2014/03/19 09:45:26 This Persistent is in a ThreadSafeRefCounted class
tkent 2014/03/19 23:43:53 Good point. DatabaseThread doesn't need to be Thre
Mads Ager (chromium) 2014/03/20 06:24:16 Thanks for that part of the explanation Kent! The
Mads Ager (chromium) 2014/03/20 06:26:03 It probably is. I guess this is the execution cont
tkent 2014/03/20 07:50:10 created it? Yes. A DatabaseContext object can be
79 // The contents of m_openSyncDatabases are raw pointers. It's safe because 79 // The contents of m_openSyncDatabases are raw pointers. It's safe because
80 // DatabaseBackendSync is always closed before destruction. 80 // DatabaseBackendSync is always closed before destruction.
81 HashSet<DatabaseBackendBase*> m_openSyncDatabases; 81 HashSet<DatabaseBackendBase*> m_openSyncDatabases;
82 bool m_hasOpenDatabases; // This never changes back to false, even after the database thread is closed. 82 bool m_hasOpenDatabases; // This never changes back to false, even after the database thread is closed.
83 bool m_isRegistered; 83 bool m_isRegistered;
84 bool m_hasRequestedTermination; 84 bool m_hasRequestedTermination;
85 }; 85 };
86 86
87 } // namespace WebCore 87 } // namespace WebCore
88 88
89 #endif // DatabaseContext_h 89 #endif // DatabaseContext_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/webdatabase/DatabaseThread.h » ('j') | Source/modules/webdatabase/DatabaseThread.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698