I'm sure this is a dumb question, but why not modify the actual
implementation of innerHTML in the core DOM if you're doing a modified
try-run anyway?
~ Gijs
On 18/06/2015 13:37, Frederik Braun wrote:
Hi,
I am planning to do a little analysis of FxOS Gaia to identify instances
of innerHTML assignments at runtime[1]. I am hoping this gives me a more
precise number about hot paths (in contrast to just looking at the
source code).
In an ideal world I would write a script along the lines of
`Object.defineProperty(Element.prototype, 'innerHTML', …)` and inject
this into every app, or at best run it somewhere so that every Element's
prototype chains back to mine.
I know that I can not modify/inherit prototypes across origins, so I am
wondering if there is something I could do with chrome privileges -
maybe patching shell.js
(https://dxr.mozilla.org/mozilla-central/source/b2g/chrome/content/shell.js),
as it is the main entrypoint from Gecko into Gaia.
Does this sound feasible? Are there any previous experiments that I
could refer to?
Thanks!
Freddy
[1] I intend to run the full test suite, not in production or anything.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform