Chromium Code Reviews| Index: Source/bindings/core/v8/ScriptPromisePropertyTest.cpp |
| diff --git a/Source/bindings/core/v8/ScriptPromisePropertyTest.cpp b/Source/bindings/core/v8/ScriptPromisePropertyTest.cpp |
| index 0d6f95941e77e5147e5ab221ec08ebbc80ce7ed7..2cc360a1d9236e6f0c5bc89ef4dad8356077cfb4 100644 |
| --- a/Source/bindings/core/v8/ScriptPromisePropertyTest.cpp |
| +++ b/Source/bindings/core/v8/ScriptPromisePropertyTest.cpp |
| @@ -131,7 +131,7 @@ public: |
| virtual ~ScriptPromisePropertyTestBase() |
| { |
| - ScriptPromisePropertyTestBase::destroyContext(); |
| + destroyContext(); |
| } |
| Document& document() { return m_page->document(); } |
| @@ -142,15 +142,13 @@ public: |
| DOMWrapperWorld& otherWorld() { return m_otherScriptState->world(); } |
| ScriptState* currentScriptState() { return ScriptState::current(isolate()); } |
| - virtual void destroyContext() |
| + void destroyContext() |
| { |
| m_page.clear(); |
| if (m_otherScriptState) { |
| m_otherScriptState->disposePerContextData(); |
| m_otherScriptState = nullptr; |
| } |
| - gc(); |
| - Heap::collectAllGarbage(); |
| } |
| void gc() { V8GCController::collectGarbage(v8::Isolate::GetCurrent()); } |
| @@ -188,12 +186,6 @@ public: |
| Property* property() { return m_holder->property(); } |
| ScriptPromise promise(DOMWrapperWorld& world) { return property()->promise(world); } |
| - void destroyContext() override |
| - { |
| - m_holder = nullptr; |
| - ScriptPromisePropertyTestBase::destroyContext(); |
| - } |
| - |
| private: |
| Persistent<GarbageCollectedHolder> m_holder; |
| }; |
| @@ -362,7 +354,7 @@ TEST_F(ScriptPromisePropertyGarbageCollectedTest, Reject_RejectsScriptPromise) |
| TEST_F(ScriptPromisePropertyGarbageCollectedTest, Promise_DeadContext) |
| { |
| - Persistent<Property> property = this->property(); |
| + Property* property = this->property(); |
|
sof
2015/08/31 08:44:03
not needed now, but a nicety to bind it to a local
yhirano
2015/09/01 07:01:55
Ah, I didn't notice that. Removed.
|
| property->resolve(new GarbageCollectedScriptWrappable("value")); |
| EXPECT_EQ(Property::Resolved, property->state()); |
| @@ -373,7 +365,7 @@ TEST_F(ScriptPromisePropertyGarbageCollectedTest, Promise_DeadContext) |
| TEST_F(ScriptPromisePropertyGarbageCollectedTest, Resolve_DeadContext) |
| { |
| - Persistent<Property> property = this->property(); |
| + Property* property = this->property(); |
| { |
| ScriptState::Scope scope(mainScriptState()); |