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

Unified Diff: Source/bindings/core/v8/ScriptPromisePropertyTest.cpp

Issue 1322673003: Do not run GC in ScriptPromisePropertyBase::destroyContext(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698