[vm/tags] Ensure current tag is set to default only if it was not previously set.
The isolate creation callback might have set up current tag, so we dont' want to override it. Fixes https://github.com/dart-lang/sdk/issues/61505 TEST=flutter ci Change-Id: I18e7f60a9c41e96c9754476db17ad97d3d668949 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449604 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Alexander Aprelev <aam@google.com>
This commit is contained in:
committed by
Commit Queue
parent
0d75724ebc
commit
4c431039bb
@@ -437,11 +437,14 @@ void Thread::EnterIsolate(Isolate* isolate) {
|
||||
thread->ExitSafepoint();
|
||||
}
|
||||
|
||||
StackZone zone(thread);
|
||||
HANDLESCOPE(thread);
|
||||
if (group->tag_table() != GrowableObjectArray::null()) {
|
||||
const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag(thread));
|
||||
thread->set_current_tag(default_tag);
|
||||
if (thread->current_tag() == UserTag::null()) {
|
||||
// Set up current tag if it was not set up by the callback.
|
||||
StackZone zone(thread);
|
||||
HANDLESCOPE(thread);
|
||||
if (group->tag_table() != GrowableObjectArray::null()) {
|
||||
const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag(thread));
|
||||
thread->set_current_tag(default_tag);
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(!thread->IsAtSafepoint());
|
||||
|
||||
Reference in New Issue
Block a user