Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: Source/modules/indexeddb/IDBTransactionTest.cpp

Issue 295163005: Remove ScriptState::current() from IDBRequest (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/indexeddb/IDBRequestTest.cpp ('k') | Source/modules/indexeddb/InspectorIndexedDBAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBTransactionTest.cpp
diff --git a/Source/modules/indexeddb/IDBTransactionTest.cpp b/Source/modules/indexeddb/IDBTransactionTest.cpp
index 8ece00889e69c6b97c710ec504e59cc60e232551..f940af9516dc11df815481b1e3340155fbd0c528 100644
--- a/Source/modules/indexeddb/IDBTransactionTest.cpp
+++ b/Source/modules/indexeddb/IDBTransactionTest.cpp
@@ -50,19 +50,17 @@ namespace {
class IDBTransactionTest : public testing::Test {
public:
IDBTransactionTest()
- : m_scope(V8ExecutionScope::create(v8::Isolate::GetCurrent()))
- , m_document(Document::create())
+ : m_scope(V8TestingScope::create(v8::Isolate::GetCurrent()))
{
+ m_scope->scriptState()->setExecutionContext(Document::create());
}
- ExecutionContext* executionContext()
- {
- return m_document.get();
- }
+ v8::Isolate* isolate() const { return m_scope->isolate(); }
+ ScriptState* scriptState() const { return m_scope->scriptState(); }
+ ExecutionContext* executionContext() { return m_scope->scriptState()->executionContext(); }
private:
- OwnPtr<V8ExecutionScope> m_scope;
- RefPtr<Document> m_document;
+ OwnPtr<V8TestingScope> m_scope;
};
class FakeWebIDBDatabase FINAL : public blink::WebIDBDatabase {
@@ -102,7 +100,7 @@ TEST_F(IDBTransactionTest, EnsureLifetime)
Heap::collectAllGarbage();
EXPECT_EQ(1u, set.size());
- Persistent<IDBRequest> request = IDBRequest::create(executionContext(), IDBAny::createUndefined(), transaction);
+ Persistent<IDBRequest> request = IDBRequest::create(scriptState(), IDBAny::createUndefined(), transaction.get());
IDBPendingTransactionMonitor::from(*executionContext()).deactivateNewTransactions();
Heap::collectAllGarbage();
« no previous file with comments | « Source/modules/indexeddb/IDBRequestTest.cpp ('k') | Source/modules/indexeddb/InspectorIndexedDBAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698