Skip to content

Commit dde2231

Browse files
Address comments
1 parent 5c53dce commit dde2231

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkgs/jni/src/dartjni.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,8 @@ Java_com_github_dart_1lang_jni_PortProxyBuilder__1invoke(
471471
//
472472
// When the current isolate is `null`, enter the main isolate that is pinned
473473
// to the main thread first before invoking the `functionPtr`.
474+
assert(Dart_CurrentIsolate_DL() == NULL ||
475+
Dart_CurrentIsolate_DL() == (Dart_Isolate)isolateId);
474476
bool mustEnterIsolate = Dart_CurrentIsolate_DL() == NULL && mayEnterIsolate;
475477
if (mustEnterIsolate) {
476478
Dart_EnterIsolate_DL((Dart_Isolate)isolateId);

0 commit comments

Comments
 (0)