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

Side by Side Diff: Source/modules/indexeddb/IDBTransactionTest.cpp

Issue 318023002: Oilpan: Prepare to make ExecutionContext GarbageCollectedMixin. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 { 60 {
61 m_scope.scriptState()->setExecutionContext(0); 61 m_scope.scriptState()->setExecutionContext(0);
62 } 62 }
63 63
64 v8::Isolate* isolate() const { return m_scope.isolate(); } 64 v8::Isolate* isolate() const { return m_scope.isolate(); }
65 ScriptState* scriptState() const { return m_scope.scriptState(); } 65 ScriptState* scriptState() const { return m_scope.scriptState(); }
66 ExecutionContext* executionContext() { return m_scope.scriptState()->executi onContext(); } 66 ExecutionContext* executionContext() { return m_scope.scriptState()->executi onContext(); }
67 67
68 private: 68 private:
69 V8TestingScope m_scope; 69 V8TestingScope m_scope;
70 RefPtr<ExecutionContext> m_executionContext; 70 RefPtrWillBePersistent<ExecutionContext> m_executionContext;
71 }; 71 };
72 72
73 class FakeWebIDBDatabase FINAL : public blink::WebIDBDatabase { 73 class FakeWebIDBDatabase FINAL : public blink::WebIDBDatabase {
74 public: 74 public:
75 static PassOwnPtr<FakeWebIDBDatabase> create() { return adoptPtr(new FakeWeb IDBDatabase()); } 75 static PassOwnPtr<FakeWebIDBDatabase> create() { return adoptPtr(new FakeWeb IDBDatabase()); }
76 76
77 virtual void commit(long long transactionId) OVERRIDE { } 77 virtual void commit(long long transactionId) OVERRIDE { }
78 virtual void abort(long long transactionId) OVERRIDE { } 78 virtual void abort(long long transactionId) OVERRIDE { }
79 virtual void close() OVERRIDE { } 79 virtual void close() OVERRIDE { }
80 80
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Fire an abort to make sure this doesn't free the transaction during use. The test 153 // Fire an abort to make sure this doesn't free the transaction during use. The test
154 // will not fail if it is, but ASAN would notice the error. 154 // will not fail if it is, but ASAN would notice the error.
155 db->onAbort(transactionId, DOMError::create(AbortError, "Aborted")); 155 db->onAbort(transactionId, DOMError::create(AbortError, "Aborted"));
156 156
157 // onAbort() should have cleared the transaction's reference to the database . 157 // onAbort() should have cleared the transaction's reference to the database .
158 Heap::collectAllGarbage(); 158 Heap::collectAllGarbage();
159 EXPECT_EQ(0u, set.size()); 159 EXPECT_EQ(0u, set.size());
160 } 160 }
161 161
162 } // namespace 162 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698