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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.cpp

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 29 matching lines...) Expand all
40 static String getDatabaseIdentifier(SQLTransactionBackend* transaction) 40 static String getDatabaseIdentifier(SQLTransactionBackend* transaction)
41 { 41 {
42 Database* database = transaction->database(); 42 Database* database = transaction->database();
43 ASSERT(database); 43 ASSERT(database);
44 return database->stringIdentifier(); 44 return database->stringIdentifier();
45 } 45 }
46 46
47 SQLTransactionCoordinator::SQLTransactionCoordinator() 47 SQLTransactionCoordinator::SQLTransactionCoordinator()
48 : m_isShuttingDown(false) 48 : m_isShuttingDown(false)
49 { 49 {
50 ASSERT(isMainThread());
50 } 51 }
51 52
52 DEFINE_TRACE(SQLTransactionCoordinator) 53 DEFINE_TRACE(SQLTransactionCoordinator)
53 { 54 {
54 visitor->trace(m_coordinationInfoMap); 55 visitor->trace(m_coordinationInfoMap);
55 } 56 }
56 57
57 void SQLTransactionCoordinator::processPendingTransactions(CoordinationInfo& inf o) 58 void SQLTransactionCoordinator::processPendingTransactions(CoordinationInfo& inf o)
58 { 59 {
59 if (info.activeWriteTransaction || info.pendingTransactions.isEmpty()) 60 if (info.activeWriteTransaction || info.pendingTransactions.isEmpty())
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 SQLTransactionBackend* transaction = info.pendingTransactions.takeFi rst(); 146 SQLTransactionBackend* transaction = info.pendingTransactions.takeFi rst();
146 transaction->notifyDatabaseThreadIsShuttingDown(); 147 transaction->notifyDatabaseThreadIsShuttingDown();
147 } 148 }
148 } 149 }
149 150
150 // Clean up all pending transactions for all databases 151 // Clean up all pending transactions for all databases
151 m_coordinationInfoMap.clear(); 152 m_coordinationInfoMap.clear();
152 } 153 }
153 154
154 } // namespace blink 155 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698