| 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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 | 890 |
| 891 std::unique_ptr<DatabaseTableNamesTask> task = DatabaseTableNamesTask::creat
e(this, &event, result); | 891 std::unique_ptr<DatabaseTableNamesTask> task = DatabaseTableNamesTask::creat
e(this, &event, result); |
| 892 getDatabaseContext()->databaseThread()->scheduleTask(std::move(task)); | 892 getDatabaseContext()->databaseThread()->scheduleTask(std::move(task)); |
| 893 event.wait(); | 893 event.wait(); |
| 894 | 894 |
| 895 return result; | 895 return result; |
| 896 } | 896 } |
| 897 | 897 |
| 898 SecurityOrigin* Database::getSecurityOrigin() const | 898 SecurityOrigin* Database::getSecurityOrigin() const |
| 899 { | 899 { |
| 900 if (!getExecutionContext()) |
| 901 return nullptr; |
| 900 if (getExecutionContext()->isContextThread()) | 902 if (getExecutionContext()->isContextThread()) |
| 901 return m_contextThreadSecurityOrigin.get(); | 903 return m_contextThreadSecurityOrigin.get(); |
| 902 if (getDatabaseContext()->databaseThread()->isDatabaseThread()) | 904 if (getDatabaseContext()->databaseThread()->isDatabaseThread()) |
| 903 return m_databaseThreadSecurityOrigin.get(); | 905 return m_databaseThreadSecurityOrigin.get(); |
| 904 return 0; | 906 return nullptr; |
| 905 } | 907 } |
| 906 | 908 |
| 907 bool Database::opened() | 909 bool Database::opened() |
| 908 { | 910 { |
| 909 return static_cast<bool>(acquireLoad(&m_opened)); | 911 return static_cast<bool>(acquireLoad(&m_opened)); |
| 910 } | 912 } |
| 911 | 913 |
| 912 } // namespace blink | 914 } // namespace blink |
| OLD | NEW |