Skip to content

Commit

Permalink
feat: fix devtools.
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed Oct 25, 2023
1 parent b8471b8 commit 123abd5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webf/lib/src/launcher/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ class WebFViewController implements WidgetsBindingObserver {
return targetId;
}

void disposeTargetIdToDevNodeIdMap(BindingObject? object) {
_targetIdToDevNodeIdMap.remove(object?.pointer?.address);
}

int forDevtoolsNodeId(BindingObject object) {
int? nativeAddress = object.pointer?.address;
if (nativeAddress != null) {
Expand Down Expand Up @@ -647,8 +651,8 @@ class WebFViewController implements WidgetsBindingObserver {
BindingObject? bindingObject = getBindingObject(pointer);
bindingObject?.dispose();
view.removeBindingObject(pointer);
view.disposeTargetIdToDevNodeIdMap(bindingObject);
malloc.free(pointer);
BindingObject.disposeTargetIdToDevNodeIdMap();
}

RenderObject getRootRenderObject() {
Expand Down

0 comments on commit 123abd5

Please sign in to comment.