Skip to content
Commit 08468773 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Restore old Audio prototype after exportFunction

exportFunction doesn't carry over a prototype, nor can I assign a non-function with it afterwards.
However, Firefox exports the "unsafe" stuff in wrappedJSObject, so I can actually get the original untrusted prototype,
exportFunction my new function, and then set it back.

I can't just use the prototype in content-script since it wouldn't be accessible from the webpage.
Interestingly enough, I have to use window.Audio rather than window.wrappedJSObject.Audio for creating the player as the
wrapped one doesn't appear to be working when used from this function. This one then still passes onto the website like
normal and plays sound.

BUG: 414512

Differential Revision: https://phabricator.kde.org/D28706
parent f23d65ec
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment