New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 631937 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Feature

Blocking:
issue 334679
issue 644392



Sign in to add a comment

replace searchbox v8 extension with a gin-based class

Project Member Reported by jochen@chromium.org, Jul 27 2016

Issue description

v8 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
 

Comment 1 by treib@chromium.org, Jul 27 2016

Cc: treib@chromium.org
 Issue 591059  has been merged into this issue.

Comment 2 by jochen@chromium.org, 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.

Comment 3 by jochen@chromium.org, Sep 13 2016

Cc: nepper@chromium.org
ping?

Comment 4 by treib@chromium.org, 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.

Comment 5 by jochen@chromium.org, 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.

Comment 6 by nepper@chromium.org, Sep 13 2016

Cc: rpop@chromium.org
Labels: -Type-Bug ntp-pe M-56 zine-triaged Type-Feature
Owner: ----
Status: Available (was: Untriaged)
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.

Comment 7 by treib@chromium.org, Sep 13 2016

Blocking: 644392
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.

Comment 9 by jochen@chromium.org, Dec 20 2016

Owner: nepper@chromium.org
Status: Assigned (was: Available)
friendly ping?

Patrick, this was triaged for M-56, what's the status?
Cc: tschumann@chromium.org
Labels: -Pri-2 -M-56 M-58 Pri-1
Please don't let PE issues linger that long :/

Comment 11 by treib@chromium.org, Jan 23 2017

Cc: -treib@chromium.org
Owner: treib@chromium.org
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?
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.
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.

Comment 14 by treib@chromium.org, 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 :)
Components: UI>Browser>NewTabPage UI>Browser>Instant>Extended
Labels: -Pri-1 -OS-All OS-Chrome OS-Linux OS-Mac OS-Windows Pri-2
Status: Started (was: Assigned)
Project Member

Comment 17 by bugdroid1@chromium.org, 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

Comment 18 by treib@chromium.org, Oct 19 2017

Status: Fixed (was: Started)

Sign in to add a comment