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

Unified Diff: runtime/vm/unit_test.h

Issue 1285293004: Migrate most uses of StackZone(Isolate*) to Thread*. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Final cleanup. 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 | « runtime/vm/snapshot_test.cc ('k') | runtime/vm/zone_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unit_test.h
diff --git a/runtime/vm/unit_test.h b/runtime/vm/unit_test.h
index 01ba00926e5dbba4eb3a75a2e2a04ec5ed2c76e5..b74d4479472ad331928968dd000a5d39889bd6e8 100644
--- a/runtime/vm/unit_test.h
+++ b/runtime/vm/unit_test.h
@@ -34,8 +34,10 @@
UNIT_TEST_CASE(name) \
{ \
TestIsolateScope __test_isolate__; \
- StackZone __zone__(__test_isolate__.isolate()); \
- HandleScope __hs__(__test_isolate__.isolate()); \
+ Thread* __thread__ = Thread::Current(); \
+ ASSERT(__thread__->isolate() == __test_isolate__.isolate()); \
+ StackZone __zone__(__thread__); \
+ HandleScope __hs__(__thread__); \
Dart_TestHelper##name(); \
} \
static void Dart_TestHelper##name()
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | runtime/vm/zone_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698