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

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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index c5940a5ee5d27ef4e6fd76b65e4f99dec3583e89..8fe3d4cc83d7f903feb938234275fdaf1e639861 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -18667,13 +18667,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());
@@ -18705,6 +18698,23 @@ RawUserTag* UserTag::New(const String& label, Heap::Space space) {
}
+RawUserTag* UserTag::MakeDefault() {
+ 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(

Powered by Google App Engine
This is Rietveld 408576698