OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // This gets a DatabaseContext for the specified ExecutionContext if | 77 // This gets a DatabaseContext for the specified ExecutionContext if |
78 // it already exist previously. Otherwise, it returns 0. | 78 // it already exist previously. Otherwise, it returns 0. |
79 DatabaseContext* existingDatabaseContextFor(ExecutionContext*); | 79 DatabaseContext* existingDatabaseContextFor(ExecutionContext*); |
80 | 80 |
81 Database* openDatabaseInternal(ExecutionContext*, | 81 Database* openDatabaseInternal(ExecutionContext*, |
82 const String& name, const String& expectedVersion, const String& display
Name, | 82 const String& name, const String& expectedVersion, const String& display
Name, |
83 unsigned long estimatedSize, bool setVersionInNewDatabase, DatabaseError
&, String& errorMessage); | 83 unsigned long estimatedSize, bool setVersionInNewDatabase, DatabaseError
&, String& errorMessage); |
84 | 84 |
85 static void logErrorMessage(ExecutionContext*, const String& message); | 85 static void logErrorMessage(ExecutionContext*, const String& message); |
86 | 86 |
| 87 // m_contextMap can have two or more entries even though we don't support |
| 88 // Web SQL on workers because single Blink process can have multiple main |
| 89 // contexts. |
87 typedef PersistentHeapHashMap<ExecutionContext*, Member<DatabaseContext> > C
ontextMap; | 90 typedef PersistentHeapHashMap<ExecutionContext*, Member<DatabaseContext> > C
ontextMap; |
88 ContextMap m_contextMap; | 91 ContextMap m_contextMap; |
89 #if ENABLE(ASSERT) | 92 #if ENABLE(ASSERT) |
90 int m_databaseContextRegisteredCount; | 93 int m_databaseContextRegisteredCount; |
91 int m_databaseContextInstanceCount; | 94 int m_databaseContextInstanceCount; |
92 #endif | 95 #endif |
93 }; | 96 }; |
94 | 97 |
95 } // namespace blink | 98 } // namespace blink |
96 | 99 |
97 #endif // DatabaseManager_h | 100 #endif // DatabaseManager_h |
OLD | NEW |