New issue
Advanced search Search tips

Issue 805244 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Investigate further extensions bindings improvements

Project Member Reported by rdevlin....@chromium.org, Jan 24 2018

Issue description

 Issue 653596  tracks converting extension bindings to be native using v8 and gin, but there are other things related to this and the binding instantiation process that might be able to speed up extension bindings.  This is a tracking bug for some of those.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d9ea83498e824139d577d035a8655ddb7402daf5

commit d9ea83498e824139d577d035a8655ddb7402daf5
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date: Sat Jan 27 06:00:04 2018

[Extensions] Factor RouteFunction() calls into a separate method

ObjectBackedNativeHandlers have a RouteFunction() ability, which
essentially exposes a callback to JS. Routing all these functions can
be potentially expensive (at the scale we do it).

Factor RouteFunction() calls into an
ObjectBackedNativeHandler::Initialize() method (also exposed as
NativeHandler::Initialize()), and ensure (through a DCHECK) that
this is the only place that allows RouteFunction() calls (as well
as potential future initialization). This will allow us to
experiment with where to put this logic.

For now, call near construction of each handler, which ensures that this
patch does *not* introduce a behavior change.  Future patches will
modify this flow.

This patch should have no functional effect.

Bug: 805244

Change-Id: I3cd886a85e2c8e4ebb17b01d640e030df9b40700
Reviewed-on: https://chromium-review.googlesource.com/879721
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532168}
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/app_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/app_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/automation_internal_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/automation_internal_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/cast_streaming_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/cast_streaming_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/file_browser_handler_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/file_browser_handler_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/file_manager_private_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/file_manager_private_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/media_galleries_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/media_galleries_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/notifications_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/notifications_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/page_capture_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/page_capture_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/platform_keys_natives.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/platform_keys_natives.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/sync_file_system_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/sync_file_system_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/webstore_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/chrome/renderer/extensions/webstore_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/api_activity_logger.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/api_activity_logger.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/api_definitions_natives.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/api_definitions_natives.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/app_window_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/app_window_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/binding_generating_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/binding_generating_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/blob_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/blob_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/context_menus_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/context_menus_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/css_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/css_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/dispatcher.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/display_source_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/display_source_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/document_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/document_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/event_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/event_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/file_system_natives.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/file_system_natives.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/guest_view/guest_view_internal_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/i18n_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/i18n_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/id_generator_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/id_generator_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/lazy_background_page_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/lazy_background_page_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/logging_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/logging_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/messaging_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/messaging_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/module_system.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/module_system.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/module_system_test.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/module_system_unittest.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/native_extension_bindings_system_test_base.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/object_backed_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/object_backed_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/process_info_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/process_info_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/render_frame_observer_natives.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/render_frame_observer_natives.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/runtime_custom_bindings.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/runtime_custom_bindings.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/script_context.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/script_context.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/send_request_natives.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/send_request_natives.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/set_icon_natives.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/set_icon_natives.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/test_features_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/test_features_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/test_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/test_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/user_gestures_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/user_gestures_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/utils_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/utils_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/v8_context_native_handler.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/v8_context_native_handler.h
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/v8_schema_registry.cc
[modify] https://crrev.com/d9ea83498e824139d577d035a8655ddb7402daf5/extensions/renderer/wake_event_page.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Jan 31 2018

Sign in to add a comment