This page demonstrates a WebKit bug where receiving video via WebRTC is blocked by the clipboard UI, leading to memory growth (video frames keep getting received and decoded into IOSurfaces, but they never get consumed / released until the paste UI is dismissed).

Usage:
Have a device with a webcam. You can use one Mac and two Safari windows for this, or one Mac and one iOS device on the same local network.

  1. Setup and Signaling
    1. Open this page in Safari and click the "Be Sender" button. Agree to let the page access your camera.
    2. Open this page in a second Safari window or on an iOS Safari tab and click/tap the "Be Receiver" button.
    3. From the sender side, copy the offer text and paste it into the receiver offer form.
      • Tip: Use Universal Clipboard to copy to iOS device
    4. From the receiver side, quickly copy the answer text and paste it into the sender answer form.
    5. A video should appear on the receiver side, streamed from the sender.
  2. Use Instruments "Activity Monitor" to track memory usage on the receiving side
  3. If the receiver is on a Mac you can put this in a terminal window while true; do vmmap --summary pid-of-receiver-page | grep IOSurface; sleep 5; done
  4. From the receiver side, copy some text from another app or site, and then tap on the "Paste" button again to bring up the paste callout, but don't yet tap on the "Paste" callout that appears, just let it sit there.
  5. Watch the memory use grow!