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

Unified Diff: Source/bindings/v8/ScriptPromiseResolverTest.cpp

Issue 183803017: Revert of Ensure DOMWrapperWorld always exists in all webkit_unit_tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/bindings/v8/IDBBindingUtilitiesTest.cpp ('k') | Source/bindings/v8/ScriptPromiseTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/bindings/v8/IDBBindingUtilitiesTest.cpp ('k') | Source/bindings/v8/ScriptPromiseTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698