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

Unified Diff: runtime/vm/object.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 | « runtime/vm/object.h ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 6255d2a840ec663eeec6b35534a7547db2bb5432..eacee907452c9dd40ac41472c7affd274327a0f1 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -18666,13 +18666,6 @@ void UserTag::MakeActive() const {
}
-void UserTag::ClearActive() {
- Isolate* isolate = Isolate::Current();
- ASSERT(isolate != NULL);
- isolate->clear_current_tag();
-}
-
-
RawUserTag* UserTag::New(const String& label, Heap::Space space) {
Isolate* isolate = Isolate::Current();
ASSERT(isolate->tag_table() != GrowableObjectArray::null());
@@ -18704,6 +18697,23 @@ RawUserTag* UserTag::New(const String& label, Heap::Space space) {
}
+RawUserTag* UserTag::DefaultTag() {
+ Isolate* isolate = Isolate::Current();
+ ASSERT(isolate != NULL);
+ ASSERT(isolate->object_store() != NULL);
+ if (isolate->object_store()->default_tag() != UserTag::null()) {
+ // Already created.
+ return isolate->object_store()->default_tag();
+ }
+ // Create default tag.
+ const UserTag& result = UserTag::Handle(isolate,
+ UserTag::New(Symbols::Default()));
+ ASSERT(result.tag() == UserTags::kDefaultUserTag);
+ isolate->object_store()->set_default_tag(result);
+ return result.raw();
+}
+
+
RawUserTag* UserTag::FindTagInIsolate(Isolate* isolate, const String& label) {
ASSERT(isolate->tag_table() != GrowableObjectArray::null());
const GrowableObjectArray& tag_table = GrowableObjectArray::Handle(
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698