| Index: Source/bindings/core/v8/V8PerIsolateData.h
|
| diff --git a/Source/bindings/core/v8/V8PerIsolateData.h b/Source/bindings/core/v8/V8PerIsolateData.h
|
| index b0c27f6f7290346c84cfe8f5c577a44eabb065a0..322472dc61fac7034f40487ddede7b5341936823 100644
|
| --- a/Source/bindings/core/v8/V8PerIsolateData.h
|
| +++ b/Source/bindings/core/v8/V8PerIsolateData.h
|
| @@ -31,7 +31,6 @@
|
| #include "bindings/core/v8/V8HiddenValue.h"
|
| #include "bindings/core/v8/WrapperTypeInfo.h"
|
| #include "gin/public/isolate_holder.h"
|
| -#include "modules/indexeddb/IDBPendingTransactionMonitor.h"
|
| #include "wtf/HashMap.h"
|
| #include "wtf/OwnPtr.h"
|
| #include "wtf/Vector.h"
|
| @@ -48,6 +47,12 @@ typedef WTF::Vector<DOMDataStore*> DOMDataStoreList;
|
|
|
| class V8PerIsolateData {
|
| public:
|
| + class EndOfScopeTask {
|
| + public:
|
| + virtual ~EndOfScopeTask() { }
|
| + virtual void Run() = 0;
|
| + };
|
| +
|
| static v8::Isolate* initialize();
|
| static V8PerIsolateData* from(v8::Isolate* isolate)
|
| {
|
| @@ -102,7 +107,13 @@ public:
|
| const char* previousSamplingState() const { return m_previousSamplingState; }
|
| void setPreviousSamplingState(const char* name) { m_previousSamplingState = name; }
|
|
|
| - IDBPendingTransactionMonitor* ensureIDBPendingTransactionMonitor();
|
| + // EndOfScopeTasks are run by V8RecursionScope when control is returning
|
| + // to C++ from script, after executing a script task (e.g. callback,
|
| + // event) or microtasks (e.g. promise). This is explicitly needed for
|
| + // Indexed DB transactions per spec, but should in general be avoided.
|
| + void addEndOfScopeTask(PassOwnPtr<EndOfScopeTask>);
|
| + void runEndOfScopeTasks();
|
| + void clearEndOfScopeTasks();
|
|
|
| private:
|
| V8PerIsolateData();
|
| @@ -138,7 +149,7 @@ private:
|
| OwnPtr<GCEventData> m_gcEventData;
|
| bool m_performingMicrotaskCheckpoint;
|
|
|
| - OwnPtr<IDBPendingTransactionMonitor> m_idbPendingTransactionMonitor;
|
| + Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks;
|
| };
|
|
|
| } // namespace blink
|
|
|