P2d: Function.prototype.bind + Function Proxy Konflikt (Discord/webpack) #77
Labels
No labels
bug
docs
feature
housekeeping
html-spec
performance
react-compat
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
glow-all/true-headless-browser#77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
P2d:
Function.prototype.bind+ Function Proxy KonfliktPriority: HIGH
Betrifft: discord.com/app (webpack Chunks)
Fehler:
TypeError: |this| is not a function inside Function.prototype.bindProblembeschreibung
Discord's webpack internals nutzen
Function.prototype.bind.call(fn, null)oderFunction.prototype.apply.call(fn, null, args). Unser Function-Proxy aus Sprint 14interceptet das, aber die via
eval()erzeugte Funktion (in_realmMakeFunction)ist keine echte Function-Instanz mehr —
.bind()scheitert.Aktueller Ablauf:
Function.prototype.bind.call(someFactory, null)_win.Function= unser Proxyfn.bind(_win)im construct-Trap returned gebundene Funktion.bind()auf dieser Funktion auf → TypeErrorOption A: Echte Function-Instanz statt eval() (EMPFEHLUNG)
Akzeptanzkriterien
|this| is not a functionErrorFunction.prototype.bind.call(fn, null)funktioniertfn.apply(null, args)funktioniertBetroffene Dateien
src/js/execution-realm.tstests/unit/sprint14-new-function-sandbox.test.ts⚠️ Kein separater Fix nötig — Symptom von anderen Issues
Nach Analyse:
TypeError: |this| is not a function inside Function.prototype.bindwird verursacht durch:Der Function-Proxy aus Sprint 14 ist korrekt. Der Fehler entsteht weil webpack undefined/Proxy-Werte
bekommt, wenn Module nicht geladen werden können, und
.bind()darauf aufruft.Status: Geschlossen — keine Änderung am Function Proxy nötig