| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 ScriptState* getScriptState() const { return m_scope.getScriptState(); } | 67 ScriptState* getScriptState() const { return m_scope.getScriptState(); } |
| 68 ExecutionContext* getExecutionContext() { return m_scope.getScriptState()->g
etExecutionContext(); } | 68 ExecutionContext* getExecutionContext() { return m_scope.getScriptState()->g
etExecutionContext(); } |
| 69 | 69 |
| 70 void deactivateNewTransactions() | 70 void deactivateNewTransactions() |
| 71 { | 71 { |
| 72 V8PerIsolateData::from(isolate())->runEndOfScopeTasks(); | 72 V8PerIsolateData::from(isolate())->runEndOfScopeTasks(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 V8TestingScope m_scope; | 76 V8TestingScope m_scope; |
| 77 RefPtrWillBePersistent<ExecutionContext> m_executionContext; | 77 Persistent<ExecutionContext> m_executionContext; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 class FakeIDBDatabaseCallbacks final : public IDBDatabaseCallbacks { | 80 class FakeIDBDatabaseCallbacks final : public IDBDatabaseCallbacks { |
| 81 public: | 81 public: |
| 82 static FakeIDBDatabaseCallbacks* create() { return new FakeIDBDatabaseCallba
cks(); } | 82 static FakeIDBDatabaseCallbacks* create() { return new FakeIDBDatabaseCallba
cks(); } |
| 83 void onVersionChange(int64_t oldVersion, int64_t newVersion) override { } | 83 void onVersionChange(int64_t oldVersion, int64_t newVersion) override { } |
| 84 void onForcedClose() override { } | 84 void onForcedClose() override { } |
| 85 void onAbort(int64_t transactionId, DOMException* error) override { } | 85 void onAbort(int64_t transactionId, DOMException* error) override { } |
| 86 void onComplete(int64_t transactionId) override { } | 86 void onComplete(int64_t transactionId) override { } |
| 87 private: | 87 private: |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // will not fail if it is, but ASAN would notice the error. | 156 // will not fail if it is, but ASAN would notice the error. |
| 157 db->onAbort(transactionId, DOMException::create(AbortError, "Aborted")); | 157 db->onAbort(transactionId, DOMException::create(AbortError, "Aborted")); |
| 158 | 158 |
| 159 // onAbort() should have cleared the transaction's reference to the database
. | 159 // onAbort() should have cleared the transaction's reference to the database
. |
| 160 Heap::collectAllGarbage(); | 160 Heap::collectAllGarbage(); |
| 161 EXPECT_EQ(0u, set.size()); | 161 EXPECT_EQ(0u, set.size()); |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace | 164 } // namespace |
| 165 } // namespace blink | 165 } // namespace blink |
| OLD | NEW |