Skip to content

Commit 9fa0f08

Browse files
aamCommit Queue
authored and
Commit Queue
committed
[vm] Remove redundant VerifyOriginId.
It was made redundant by 69485e9, which started using isolate group id as origin id. It is populated by different random generator than the one used for isolate id. Fixes #60651 TEST=ci Change-Id: I42545f8a491dbaa7e8b7f636df929522b4499990 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425700 Commit-Queue: Alexander Aprelev <[email protected]> Reviewed-by: Ryan Macnak <[email protected]>
1 parent 926d4e1 commit 9fa0f08

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

runtime/vm/isolate.cc

-20
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,6 @@ DEFINE_FLAG(bool,
103103
#define I (isolate())
104104
#define IG (isolate_group())
105105

106-
#if defined(DEBUG)
107-
// Helper class to ensure that a live origin_id is never reused
108-
// and assigned to an isolate.
109-
class VerifyOriginId : public IsolateVisitor {
110-
public:
111-
explicit VerifyOriginId(Dart_Port id) : id_(id) {}
112-
113-
void VisitIsolate(Isolate* isolate) { ASSERT(isolate->group()->id() != id_); }
114-
115-
private:
116-
Dart_Port id_;
117-
DISALLOW_COPY_AND_ASSIGN(VerifyOriginId);
118-
};
119-
#endif
120-
121106
static std::unique_ptr<Message> SerializeMessage(Dart_Port dest_port,
122107
const Instance& obj) {
123108
return WriteMessage(/* same_group */ false, obj, dest_port,
@@ -1939,11 +1924,6 @@ Isolate* Isolate::InitIsolate(const char* name_prefix,
19391924
result->message_handler_ = new IsolateMessageHandler(result);
19401925

19411926
result->set_main_port(PortMap::CreatePort(result->message_handler()));
1942-
#if defined(DEBUG)
1943-
// Verify that we are never reusing a live origin id.
1944-
VerifyOriginId id_verifier(result->main_port());
1945-
Isolate::VisitIsolates(&id_verifier);
1946-
#endif
19471927

19481928
// First we ensure we enter the isolate. This will ensure we're participating
19491929
// in any safepointing requests from this point on. Other threads requesting a

0 commit comments

Comments
 (0)