| Index: Source/bindings/v8/ScriptPromiseResolverTest.cpp
|
| diff --git a/Source/bindings/v8/ScriptPromiseResolverTest.cpp b/Source/bindings/v8/ScriptPromiseResolverTest.cpp
|
| index 0e4d761757f0820e10022a4c81bbad6aacafb3a3..8ab80f11b5fe46d30270c0eb0d85f56245de3300 100644
|
| --- a/Source/bindings/v8/ScriptPromiseResolverTest.cpp
|
| +++ b/Source/bindings/v8/ScriptPromiseResolverTest.cpp
|
| @@ -47,12 +47,16 @@
|
| public:
|
| ScriptPromiseResolverTest()
|
| : m_isolate(v8::Isolate::GetCurrent())
|
| + , m_handleScope(m_isolate)
|
| + , m_context(m_isolate, v8::Context::New(m_isolate))
|
| + , m_contextScope(m_context.newLocal(m_isolate))
|
| {
|
| }
|
|
|
| void SetUp()
|
| {
|
| - m_scope = V8BindingTestScope::create(m_isolate);
|
| + // FIXME: Create a new world and pass it to V8PerContextData.
|
| + m_perContextData = V8PerContextData::create(m_context.newLocal(m_isolate), 0);
|
| m_promise = ScriptPromise::createPending();
|
| m_resolver = ScriptPromiseResolver::create(m_promise);
|
| }
|
| @@ -61,7 +65,7 @@
|
| {
|
| m_resolver = nullptr;
|
| m_promise.clear();
|
| - m_scope.clear();
|
| + m_perContextData.clear();
|
| }
|
|
|
| V8PromiseCustom::PromiseState state()
|
| @@ -82,10 +86,12 @@
|
|
|
| protected:
|
| v8::Isolate* m_isolate;
|
| + v8::HandleScope m_handleScope;
|
| + ScopedPersistent<v8::Context> m_context;
|
| + v8::Context::Scope m_contextScope;
|
| RefPtr<ScriptPromiseResolver> m_resolver;
|
| ScriptPromise m_promise;
|
| -private:
|
| - OwnPtr<V8BindingTestScope> m_scope;
|
| + OwnPtr<V8PerContextData> m_perContextData;
|
| };
|
|
|
| TEST_F(ScriptPromiseResolverTest, initialState)
|
|
|