Skip to content

Commit ef3aa01

Browse files
authored
Disable setting a library tag handler. (flutter#16086)
This is only used in the command line VM. The only conceivable use of this would be with IsolateMirror.loadURI which is not supported in Flutter or used in known embedder API implementations (even ones that use mirrors).
1 parent 86682a2 commit ef3aa01

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

runtime/dart_isolate.cc

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,6 @@ bool DartIsolate::Initialize(Dart_Isolate dart_isolate) {
184184

185185
SetMessageHandlingTaskRunner(GetTaskRunners().GetUITaskRunner());
186186

187-
if (tonic::LogIfError(
188-
Dart_SetLibraryTagHandler(tonic::DartState::HandleLibraryTag))) {
189-
return false;
190-
}
191-
192187
if (!UpdateThreadPoolNames()) {
193188
return false;
194189
}
@@ -623,10 +618,9 @@ Dart_Isolate DartIsolate::DartCreateAndStartServiceIsolate(
623618

624619
tonic::DartState::Scope scope(service_isolate);
625620
if (!DartServiceIsolate::Startup(
626-
settings.observatory_host, // server IP address
627-
settings.observatory_port, // server observatory port
628-
tonic::DartState::HandleLibraryTag, // embedder library tag handler
629-
false, // disable websocket origin check
621+
settings.observatory_host, // server IP address
622+
settings.observatory_port, // server observatory port
623+
false, // disable websocket origin check
630624
settings.disable_service_auth_codes, // disable VM service auth codes
631625
error // error (out)
632626
)) {

runtime/dart_service_isolate.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
namespace flutter {
3131
namespace {
3232

33-
static Dart_LibraryTagHandler g_embedder_tag_handler;
3433
static tonic::DartLibraryNatives* g_natives;
3534
static std::string g_observatory_uri;
3635

@@ -127,17 +126,12 @@ void DartServiceIsolate::Shutdown(Dart_NativeArguments args) {
127126

128127
bool DartServiceIsolate::Startup(std::string server_ip,
129128
intptr_t server_port,
130-
Dart_LibraryTagHandler embedder_tag_handler,
131129
bool disable_origin_check,
132130
bool disable_service_auth_codes,
133131
char** error) {
134132
Dart_Isolate isolate = Dart_CurrentIsolate();
135133
FML_CHECK(isolate);
136134

137-
// Remember the embedder's library tag handler.
138-
g_embedder_tag_handler = embedder_tag_handler;
139-
FML_CHECK(g_embedder_tag_handler);
140-
141135
// Setup native entries.
142136
if (!g_natives) {
143137
g_natives = new tonic::DartLibraryNatives();

runtime/dart_service_isolate.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class DartServiceIsolate {
2323

2424
static bool Startup(std::string server_ip,
2525
intptr_t server_port,
26-
Dart_LibraryTagHandler embedder_tag_handler,
2726
bool disable_origin_check,
2827
bool disable_service_auth_codes,
2928
char** error);

0 commit comments

Comments
 (0)