| 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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()), | 760 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()), |
| 761 stringIdentifier(), sqliteErrorCode); | 761 stringIdentifier(), sqliteErrorCode); |
| 762 } | 762 } |
| 763 } | 763 } |
| 764 | 764 |
| 765 void Database::logErrorMessage(const String& message) | 765 void Database::logErrorMessage(const String& message) |
| 766 { | 766 { |
| 767 executionContext()->addConsoleMessage(ConsoleMessage::create(StorageMessageS
ource, ErrorMessageLevel, message)); | 767 executionContext()->addConsoleMessage(ConsoleMessage::create(StorageMessageS
ource, ErrorMessageLevel, message)); |
| 768 } | 768 } |
| 769 | 769 |
| 770 DatabaseContext* Database::databaseContext() const | |
| 771 { | |
| 772 return m_databaseContext; | |
| 773 } | |
| 774 | |
| 775 ExecutionContext* Database::executionContext() const | 770 ExecutionContext* Database::executionContext() const |
| 776 { | 771 { |
| 777 return databaseContext()->executionContext(); | 772 return databaseContext()->executionContext(); |
| 778 } | 773 } |
| 779 | 774 |
| 780 void Database::closeImmediately() | 775 void Database::closeImmediately() |
| 781 { | 776 { |
| 782 ASSERT(executionContext()->isContextThread()); | 777 ASSERT(executionContext()->isContextThread()); |
| 783 if (databaseContext()->databaseThreadAvailable() && opened()) { | 778 if (databaseContext()->databaseThreadAvailable() && opened()) { |
| 784 logErrorMessage("forcibly closing database"); | 779 logErrorMessage("forcibly closing database"); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 SecurityOrigin* Database::securityOrigin() const | 896 SecurityOrigin* Database::securityOrigin() const |
| 902 { | 897 { |
| 903 if (executionContext()->isContextThread()) | 898 if (executionContext()->isContextThread()) |
| 904 return m_contextThreadSecurityOrigin.get(); | 899 return m_contextThreadSecurityOrigin.get(); |
| 905 if (databaseContext()->databaseThread()->isDatabaseThread()) | 900 if (databaseContext()->databaseThread()->isDatabaseThread()) |
| 906 return m_databaseThreadSecurityOrigin.get(); | 901 return m_databaseThreadSecurityOrigin.get(); |
| 907 return 0; | 902 return 0; |
| 908 } | 903 } |
| 909 | 904 |
| 910 } // namespace blink | 905 } // namespace blink |
| OLD | NEW |