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

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

Issue 204543005: Replace the Persistent in SQLiteDatabase with a member and trace it. (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
« no previous file with comments | « no previous file | Source/modules/webdatabase/sqlite/SQLiteDatabase.h » ('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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // and hence we should also close it on that same thread. This means that th e 243 // and hence we should also close it on that same thread. This means that th e
244 // SQLite database need to be closed by another mechanism (see 244 // SQLite database need to be closed by another mechanism (see
245 // DatabaseContext::stopDatabases()). By the time we get here, the SQLite 245 // DatabaseContext::stopDatabases()). By the time we get here, the SQLite
246 // database should have already been closed. 246 // database should have already been closed.
247 247
248 ASSERT(!m_opened); 248 ASSERT(!m_opened);
249 } 249 }
250 250
251 void DatabaseBackendBase::trace(Visitor* visitor) 251 void DatabaseBackendBase::trace(Visitor* visitor)
252 { 252 {
253 visitor->trace(m_sqliteDatabase);
253 visitor->trace(m_databaseAuthorizer); 254 visitor->trace(m_databaseAuthorizer);
254 } 255 }
255 256
256 void DatabaseBackendBase::closeDatabase() 257 void DatabaseBackendBase::closeDatabase()
257 { 258 {
258 if (!m_opened) 259 if (!m_opened)
259 return; 260 return;
260 261
261 m_sqliteDatabase.close(); 262 m_sqliteDatabase.close();
262 m_opened = false; 263 m_opened = false;
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 { 665 {
665 executionContext()->addConsoleMessage(StorageMessageSource, ErrorMessageLeve l, message); 666 executionContext()->addConsoleMessage(StorageMessageSource, ErrorMessageLeve l, message);
666 } 667 }
667 668
668 ExecutionContext* DatabaseBackendBase::executionContext() const 669 ExecutionContext* DatabaseBackendBase::executionContext() const
669 { 670 {
670 return databaseContext()->executionContext(); 671 return databaseContext()->executionContext();
671 } 672 }
672 673
673 } // namespace WebCore 674 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/modules/webdatabase/sqlite/SQLiteDatabase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698