OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2013 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 * | 7 * |
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 // FIXME: Currently, we're only simulating the backend by return the | 61 // FIXME: Currently, we're only simulating the backend by return the |
62 // frontend database as its own the backend. When we split the 2 apart, | 62 // frontend database as its own the backend. When we split the 2 apart, |
63 // this create() function should be changed to be a factory method for | 63 // this create() function should be changed to be a factory method for |
64 // instantiating the backend. | 64 // instantiating the backend. |
65 return static_cast<Database*>(backend.get()); | 65 return static_cast<Database*>(backend.get()); |
66 } | 66 } |
67 | 67 |
68 Database::Database(DatabaseContext* databaseContext, | 68 Database::Database(DatabaseContext* databaseContext, |
69 const String& name, const String& expectedVersion, const String& displayName , unsigned long estimatedSize) | 69 const String& name, const String& expectedVersion, const String& displayName , unsigned long estimatedSize) |
70 : DatabaseBackend(databaseContext, name, expectedVersion, displayName, estim atedSize) | 70 : DatabaseBackend(databaseContext, name, expectedVersion, displayName, estim atedSize) |
71 , DatabaseBase(databaseContext->executionContext()) | |
72 , m_databaseContext(DatabaseBackend::databaseContext()) | 71 , m_databaseContext(DatabaseBackend::databaseContext()) |
73 { | 72 { |
74 m_databaseThreadSecurityOrigin = m_contextThreadSecurityOrigin->isolatedCopy (); | 73 m_databaseThreadSecurityOrigin = m_contextThreadSecurityOrigin->isolatedCopy (); |
75 setFrontend(this); | 74 setFrontend(this); |
76 | 75 |
77 ASSERT(m_databaseContext->databaseThread()); | 76 ASSERT(m_databaseContext->databaseThread()); |
77 ASSERT(databaseContext->isContextThread()); | |
haraken
2014/09/11 09:22:59
Not related to your CL, it's a bit confusing that
tkent
2014/09/11 09:39:16
You misunderstand the first ASSERT, which means m_
| |
78 } | 78 } |
79 | 79 |
80 Database::~Database() | 80 Database::~Database() |
81 { | 81 { |
82 } | 82 } |
83 | 83 |
84 void Database::trace(Visitor* visitor) | 84 void Database::trace(Visitor* visitor) |
85 { | 85 { |
86 visitor->trace(m_databaseContext); | 86 visitor->trace(m_databaseContext); |
87 DatabaseBackend::trace(visitor); | 87 DatabaseBackend::trace(visitor); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
242 backend()->reportStartTransactionResult(errorSite, webSqlErrorCode, sqliteEr rorCode); | 242 backend()->reportStartTransactionResult(errorSite, webSqlErrorCode, sqliteEr rorCode); |
243 } | 243 } |
244 | 244 |
245 void Database::reportCommitTransactionResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode) | 245 void Database::reportCommitTransactionResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode) |
246 { | 246 { |
247 backend()->reportCommitTransactionResult(errorSite, webSqlErrorCode, sqliteE rrorCode); | 247 backend()->reportCommitTransactionResult(errorSite, webSqlErrorCode, sqliteE rrorCode); |
248 } | 248 } |
249 | 249 |
250 | 250 |
251 } // namespace blink | 251 } // namespace blink |
OLD | NEW |