| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 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 * 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 , m_name(name.isolatedCopy()) | 207 , m_name(name.isolatedCopy()) |
| 208 , m_expectedVersion(expectedVersion.isolatedCopy()) | 208 , m_expectedVersion(expectedVersion.isolatedCopy()) |
| 209 , m_displayName(displayName.isolatedCopy()) | 209 , m_displayName(displayName.isolatedCopy()) |
| 210 , m_estimatedSize(estimatedSize) | 210 , m_estimatedSize(estimatedSize) |
| 211 , m_guid(0) | 211 , m_guid(0) |
| 212 , m_opened(false) | 212 , m_opened(false) |
| 213 , m_new(false) | 213 , m_new(false) |
| 214 , m_transactionInProgress(false) | 214 , m_transactionInProgress(false) |
| 215 , m_isTransactionQueueEnabled(true) | 215 , m_isTransactionQueueEnabled(true) |
| 216 { | 216 { |
| 217 ASSERT(isMainThread()); |
| 217 m_contextThreadSecurityOrigin = m_databaseContext->securityOrigin()->isolate
dCopy(); | 218 m_contextThreadSecurityOrigin = m_databaseContext->securityOrigin()->isolate
dCopy(); |
| 218 | 219 |
| 219 m_databaseAuthorizer = DatabaseAuthorizer::create(infoTableName); | 220 m_databaseAuthorizer = DatabaseAuthorizer::create(infoTableName); |
| 220 | 221 |
| 221 if (m_name.isNull()) | 222 if (m_name.isNull()) |
| 222 m_name = ""; | 223 m_name = ""; |
| 223 | 224 |
| 224 { | 225 { |
| 225 SafePointAwareMutexLocker locker(guidMutex()); | 226 SafePointAwareMutexLocker locker(guidMutex()); |
| 226 m_guid = guidForOriginAndName(securityOrigin()->toString(), name); | 227 m_guid = guidForOriginAndName(securityOrigin()->toString(), name); |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 SecurityOrigin* Database::securityOrigin() const | 897 SecurityOrigin* Database::securityOrigin() const |
| 897 { | 898 { |
| 898 if (executionContext()->isContextThread()) | 899 if (executionContext()->isContextThread()) |
| 899 return m_contextThreadSecurityOrigin.get(); | 900 return m_contextThreadSecurityOrigin.get(); |
| 900 if (databaseContext()->databaseThread()->isDatabaseThread()) | 901 if (databaseContext()->databaseThread()->isDatabaseThread()) |
| 901 return m_databaseThreadSecurityOrigin.get(); | 902 return m_databaseThreadSecurityOrigin.get(); |
| 902 return 0; | 903 return 0; |
| 903 } | 904 } |
| 904 | 905 |
| 905 } // namespace blink | 906 } // namespace blink |
| OLD | NEW |