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

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

Issue 209043008: Remove unnecesary usage of RefPtr and PassRefPtr of DatabaseContext. (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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 // stop() is from stopActiveDOMObjects() which indicates that the owner LocalFra me 139 // stop() is from stopActiveDOMObjects() which indicates that the owner LocalFra me
140 // or WorkerThread is shutting down. Initiate the orderly shutdown by stopping 140 // or WorkerThread is shutting down. Initiate the orderly shutdown by stopping
141 // the associated databases. 141 // the associated databases.
142 void DatabaseContext::stop() 142 void DatabaseContext::stop()
143 { 143 {
144 stopDatabases(); 144 stopDatabases();
145 } 145 }
146 146
147 PassRefPtr<DatabaseContext> DatabaseContext::backend() 147 DatabaseContext* DatabaseContext::backend()
148 { 148 {
149 DatabaseContext* backend = static_cast<DatabaseContext*>(this); 149 return this;
150 return backend;
151 } 150 }
152 151
153 DatabaseThread* DatabaseContext::databaseThread() 152 DatabaseThread* DatabaseContext::databaseThread()
154 { 153 {
155 if (!m_databaseThread && !m_hasOpenDatabases) { 154 if (!m_databaseThread && !m_hasOpenDatabases) {
156 // It's OK to ask for the m_databaseThread after we've requested 155 // It's OK to ask for the m_databaseThread after we've requested
157 // termination because we're still using it to execute the closing 156 // termination because we're still using it to execute the closing
158 // of the database. However, it is NOT OK to create a new thread 157 // of the database. However, it is NOT OK to create a new thread
159 // after we've requested termination. 158 // after we've requested termination.
160 ASSERT(!m_hasRequestedTermination); 159 ASSERT(!m_hasRequestedTermination);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 { 239 {
241 return executionContext()->securityOrigin(); 240 return executionContext()->securityOrigin();
242 } 241 }
243 242
244 bool DatabaseContext::isContextThread() const 243 bool DatabaseContext::isContextThread() const
245 { 244 {
246 return executionContext()->isContextThread(); 245 return executionContext()->isContextThread();
247 } 246 }
248 247
249 } // namespace WebCore 248 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698