Skip to content

DDC leaks parent window monkey-patches #32113

@nex3

Description

@nex3

If DDC-compiled code in an iframe calls window.parent, DDC injects a bunch of monkey-patches into the parent Window's prototype. If the iframe is later killed, these monkey-patches remain; what's worse, on Chrome they stop the frame's entire DOM tree from being garbage collected. This can create a memory leak when a DDC app is loaded in a child frame, even if that app only ever communicates with the parent window using something like window.postMessage() that doesn't involve sending Dart objects back and forth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)web-dev-compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions