MONKEYPATCH THE PLANET!
summary
Shows concrete techniques: replacing window.alert by rewriting calls with an AST using falafel, or via a source‑to‑source transform that doubles function calls and forces source maps. Introduces zone jas to monkeypatch all async APIs for continuation local storage, notes runtime overhead from about 0.5% up to pathological 95% and memory blowups to ~18x, and that thousands of production sites (New Relic) run monkey‑patched environments. Built an intermediately sized Hadron Collider that runs patches against common libraries to detect breakage.
AI-written summary · about
chapters (10)
- 0:00Start
- 3:08What if we used a JS parsert
- 3:52what if we used a JS parser... more?
- 7:02but what about async?
- 7:18monkey patch setTimeout!
- 7:48what about like... all the other APIs?
- 8:06in the browser-Zone.js
- 9:57Monkey patcher's Code of Honor
- 12:40how to deal with haters
- 13:38in summary
related talks
37mDeep dive into zone.js
35mJavaScript Realms: The Blank Spot In Web App Runtime Security
40mHostile JavaScript: Attacking and Defending the Browser
45mDownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
01h 08mSquashing JavaScript Bugs
30m"Doing The Unstuck"
26mJavaScript JITs
01h 02mChange Detection, Zone.js and Other Monsters
