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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 1312813006: - Remove deprecated StackZone constructor with Isolate parameter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/dart_api_impl_test.cc
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 8ea4e6833dd8d719f1daf6c2ce883195a1a4e16d..f79106ef350f61bd64bddeba60cf73edbf78654f 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -2381,7 +2381,8 @@ UNIT_TEST_CASE(PersistentHandles) {
const char* kTestString1 = "Test String1";
const char* kTestString2 = "Test String2";
TestCase::CreateTestIsolate();
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
EXPECT(isolate != NULL);
ApiState* state = isolate->api_state();
EXPECT(state != NULL);
@@ -2413,8 +2414,8 @@ UNIT_TEST_CASE(PersistentHandles) {
}
Dart_ExitScope();
{
- StackZone zone(isolate);
- HANDLESCOPE(Thread::Current());
+ StackZone zone(thread);
+ HANDLESCOPE(thread);
for (int i = 0; i < 500; i++) {
String& str = String::Handle();
str ^= PersistentHandle::Cast(handles[i])->raw();
@@ -3688,15 +3689,16 @@ TEST_CASE(SingleGarbageCollectionCallback) {
// scope.
UNIT_TEST_CASE(LocalHandles) {
TestCase::CreateTestIsolate();
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
EXPECT(isolate != NULL);
ApiState* state = isolate->api_state();
EXPECT(state != NULL);
ApiLocalScope* scope = state->top_scope();
Dart_Handle handles[300];
{
- StackZone zone(isolate);
- HANDLESCOPE(Thread::Current());
+ StackZone zone(thread);
+ HANDLESCOPE(thread);
Smi& val = Smi::Handle();
// Start a new scope and allocate some local handles.
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/find_code_object_test.cc » ('j') | runtime/vm/service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698