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

Unified Diff: runtime/lib/profiler.cc

Issue 266913010: Refactor 'dart:profiler' UserTag API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | runtime/lib/profiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/profiler.cc
diff --git a/runtime/lib/profiler.cc b/runtime/lib/profiler.cc
index 75bf2d1ff768f29abb15c6b59d8ff774fbb6eacf..3128fb98194ed905be179c2088f90acc9ce9db71 100644
--- a/runtime/lib/profiler.cc
+++ b/runtime/lib/profiler.cc
@@ -36,28 +36,26 @@ DEFINE_NATIVE_ENTRY(UserTag_makeCurrent, 1) {
if (FLAG_trace_intrinsified_natives) {
OS::Print("UserTag_makeCurrent: %s\n", self.ToCString());
}
+ const UserTag& old = UserTag::Handle(isolate->current_tag());
self.MakeActive();
- return Object::null();
+ return old.raw();
}
-DEFINE_NATIVE_ENTRY(Profiler_getCurrentTag, 0) {
+DEFINE_NATIVE_ENTRY(UserTag_defaultTag, 0) {
if (FLAG_trace_intrinsified_natives) {
- OS::Print("Profiler_getCurrentTag\n");
+ OS::Print("UserTag_defaultTag\n");
}
- return isolate->current_tag();
+ return isolate->object_store()->default_tag();
}
-DEFINE_NATIVE_ENTRY(Profiler_clearCurrentTag, 0) {
- // Use a NoGCScope to avoid creating a handle for the old current.
- NoGCScope no_gc;
- RawUserTag* old_current = isolate->current_tag();
- UserTag::ClearActive();
+DEFINE_NATIVE_ENTRY(Profiler_getCurrentTag, 0) {
if (FLAG_trace_intrinsified_natives) {
- OS::Print("Profiler_clearCurrentTag\n");
+ OS::Print("Profiler_getCurrentTag\n");
}
- return old_current;
+ return isolate->current_tag();
}
+
} // namespace dart
« no previous file with comments | « no previous file | runtime/lib/profiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698