replace searchbox v8 extension with a gin-based class |
||||||||||
Issue descriptionv8 extensions are deprecated because they slow down startup and have questionable security properties. See the blocking bug for some examples how to replace a v8 extension with a gin class, e.g., https://codereview.chromium.org/163683004
,
Jul 27 2016
Seems like I keep filing bugs for this :) The problem this time is that the closure compiler can't parse the searchbox_api.js file as it doesn't understand the native function syntax.
,
Sep 13 2016
ping?
,
Sep 13 2016
How urgent is this? Note that this v8 extension is only registered for the Instant process (see https://cs.chromium.org/chromium/src/chrome/renderer/chrome_content_renderer_client.cc?rcl=0&l=398), so the startup time concern should be less severe here.
,
Sep 13 2016
it's blocking the removal of this infrastructure, so it's not P0, but it would be nice if it was high enough priority that it eventually gets done.
,
Sep 13 2016
Maybe this is a good starter project for someone or a candidate for our next PE fixit. We currently have two P1s on our PE list, so I hope this can be addressed soon. Also adding rpop incase someone from the desktop team wants to jump on this.
,
Sep 13 2016
,
Oct 24 2016
A note for whoever fixes this - as part of fixing this please re-enable minifying seachbox_api.js in https://cs.chromium.org/chromium/src/tools/grit/grit/format/minifier.py.
,
Dec 20 2016
friendly ping? Patrick, this was triaged for M-56, what's the status?
,
Jan 23 2017
Please don't let PE issues linger that long :/
,
Jan 23 2017
Unfortunately, I've been the only engineer working (part-time) on maintaining the desktop NTP for quite a while now. So anything that doesn't address an immediate user-visible problem tends to get postponed indefinitely :-/ That said, I'll be able to spend some more time on desktop this quarter, so there's hope ;-) Can you provide any numbers on the performance improvement this would bring, or the #LoC that could be removed, or something else that would help justifying the effort?
,
Jan 23 2017
Let's see how we can prioritize this. But to be fair, I'd also like to point out that this is not really a PE issue of the NTP team. Deprecating infrastructure is a delicate topic and it's not always clear who should pay the cost. From the CL you referenced, I can see that the gin-based solution is nicer but as we rarely touch the code, there's no clear gain. The numbers Marc asked for would certainly help making a better call here.
,
Jan 23 2017
on my desktop, we spent about 2.75ms per iframe setting up v8 and blink, and 0.3ms installing this extension, so you'd shave off about 10% of iframe creation time by this.
,
Feb 20 2017
FYI: I've recently added some integration tests that exercise the searchbox API, see bug 692002 . These are by no means comprehensive, but they'll at least verify that the happy path is correctly hooked up. That should make this refactoring a bit less scary :)
,
Sep 4 2017
,
Oct 4 2017
,
Oct 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/06d66032b7347e23e4ff2f49a8692efc5ad07d1c commit 06d66032b7347e23e4ff2f49a8692efc5ad07d1c Author: Marc Treib <treib@chromium.org> Date: Thu Oct 19 08:43:20 2017 Convert the embeddedSearch/searchBox v8 extension to a gin::Wrappable Bug: 631937 Change-Id: I1b0396f0dc757d9f445909ce244a6f72e1983b49 Reviewed-on: https://chromium-review.googlesource.com/700443 Reviewed-by: Jochen Eisinger <jochen@chromium.org> Commit-Queue: Marc Treib <treib@chromium.org> Cr-Commit-Position: refs/heads/master@{#510039} [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/renderer/chrome_content_renderer_client.cc [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/renderer/chrome_render_frame_observer.cc [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/renderer/chrome_render_frame_observer.h [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/renderer/resources/extensions/OWNERS [delete] https://crrev.com/d54d7720c320abe789fa929ed9846474c699094e/chrome/renderer/resources/extensions/searchbox_api.js [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/renderer/resources/renderer_resources.grd [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/renderer/searchbox/searchbox.cc [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/renderer/searchbox/searchbox.h [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/renderer/searchbox/searchbox_extension.cc [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/renderer/searchbox/searchbox_extension.h [delete] https://crrev.com/d54d7720c320abe789fa929ed9846474c699094e/chrome/renderer/searchbox/searchbox_extension_unittest.cc [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/test/BUILD.gn [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/test/data/instant_extended.html [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/chrome/test/data/instant_extended_ntp.html [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/content/public/renderer/render_view.h [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/content/renderer/render_view_impl.cc [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/content/renderer/render_view_impl.h [modify] https://crrev.com/06d66032b7347e23e4ff2f49a8692efc5ad07d1c/tools/grit/grit/format/minifier.py
,
Oct 19 2017
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by treib@chromium.org
, Jul 27 2016