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

Side by Side Diff: Source/bindings/core/v8/ScriptPromisePropertyTest.cpp

Issue 1328653002: Introduce V8GCController::collectAllGarbage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "bindings/core/v8/ScriptPromiseProperty.h" 6 #include "bindings/core/v8/ScriptPromiseProperty.h"
7 7
8 #include "bindings/core/v8/DOMWrapperWorld.h" 8 #include "bindings/core/v8/DOMWrapperWorld.h"
9 #include "bindings/core/v8/ScriptFunction.h" 9 #include "bindings/core/v8/ScriptFunction.h"
10 #include "bindings/core/v8/ScriptPromise.h" 10 #include "bindings/core/v8/ScriptPromise.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 void destroyContext() 145 void destroyContext()
146 { 146 {
147 m_page.clear(); 147 m_page.clear();
148 if (m_otherScriptState) { 148 if (m_otherScriptState) {
149 m_otherScriptState->disposePerContextData(); 149 m_otherScriptState->disposePerContextData();
150 m_otherScriptState = nullptr; 150 m_otherScriptState = nullptr;
151 } 151 }
152 } 152 }
153 153
154 void gc() { V8GCController::collectGarbage(v8::Isolate::GetCurrent()); } 154 void gc() { V8GCController::collectAllGarbage(v8::Isolate::GetCurrent()); }
155 155
156 v8::Local<v8::Function> notReached(ScriptState* scriptState) { return NotRea ched::createFunction(scriptState); } 156 v8::Local<v8::Function> notReached(ScriptState* scriptState) { return NotRea ched::createFunction(scriptState); }
157 v8::Local<v8::Function> stub(ScriptState* scriptState, ScriptValue& value, s ize_t& callCount) { return StubFunction::createFunction(scriptState, value, call Count); } 157 v8::Local<v8::Function> stub(ScriptState* scriptState, ScriptValue& value, s ize_t& callCount) { return StubFunction::createFunction(scriptState, value, call Count); }
158 158
159 template <typename T> 159 template <typename T>
160 ScriptValue wrap(DOMWrapperWorld& world, const T& value) 160 ScriptValue wrap(DOMWrapperWorld& world, const T& value)
161 { 161 {
162 v8::HandleScope handleScope(isolate()); 162 v8::HandleScope handleScope(isolate());
163 ScriptState* scriptState = ScriptState::from(toV8Context(&document(), wo rld)); 163 ScriptState* scriptState = ScriptState::from(toV8Context(&document(), wo rld));
164 ScriptState::Scope scope(scriptState); 164 ScriptState::Scope scope(scriptState);
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 { 536 {
537 test(String("hello"), "hello", __FILE__, __LINE__); 537 test(String("hello"), "hello", __FILE__, __LINE__);
538 } 538 }
539 539
540 TEST_F(ScriptPromisePropertyNonScriptWrappableResolutionTargetTest, ResolveWithI nteger) 540 TEST_F(ScriptPromisePropertyNonScriptWrappableResolutionTargetTest, ResolveWithI nteger)
541 { 541 {
542 test(-1, "-1", __FILE__, __LINE__); 542 test(-1, "-1", __FILE__, __LINE__);
543 } 543 }
544 544
545 } // namespace 545 } // namespace
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8GCController.h » ('j') | Source/web/tests/WebUnitTests.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698