On 18.06.2015 14:56, Gijs Kruitbosch wrote: > 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? >
This is actually a very good question. Unfortunately, I'm not that great at C/C++ and was hoping for a JS solution. (In the beginning of writing previous email, I was hoping for a solution that could live completely in Gaia, thus saving me compile time and enabling me to use try for running my test. But I dont think I can run try for both a custom b2g as well as a custom gaia) > ~ 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 _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform