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

Issue 638758 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Blocking:
issue 636655
issue 638735



Sign in to add a comment

Some Extension API schemas aren't generated

Project Member Reported by rdevlin....@chromium.org, Aug 17 2016

Issue description

Most Extension API schemas are generated and end up in generated_schemas.*.  This is good, because the generation eats up whitespace, comments, and unneeded fields, which means that when we use it in the renderer to create the JSON object representing the API, it parses faster.  Some APIs aren't generated, though (see https://chromium.googlesource.com/chromium/src/+/c46a48577b1b750f2561d7f3aeb45e354b45d3c4/chrome/common/extensions/chrome_extensions_client.cc#256).

We can't seem to think of a reason they shouldn't be, so let's make everything faster (and hopefully reduce binary size) and speed these up.
 
Blocking: 638735
Blocking: 636655
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 19 2016

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

commit 2d823a6736d032aa3215d1ee0994031bb0245e5b
Author: rdevlin.cronin <rdevlin.cronin@chromium.org>
Date: Fri Aug 19 18:59:14 2016

[Extensions] Generate all schema resources

Some schema resources weren't being generated (presumably because
resource generation was previously linked to function registration).
However, generated schema resources are a lot better, because they strip
out comments and whitespace, making parsing them into JSON significantly
faster.

Generate all schema resources, and remove the grit files containing the
JSON.

Note: because inline enums are disallowed (see  crbug.com/472279 ), some
schemas had to be updated. Since they weren't previously compiled, this
wasn't caught.

This also eliminates a 100k resource file (extensions_api_resources.pak).

BUG= 638758 

Review-Url: https://codereview.chromium.org/2257003002
Cr-Commit-Position: refs/heads/master@{#413200}

[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/build/json_schema_api.gni
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/BUILD.gn
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/chrome_repack_resources.gypi
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/chrome_resources.gyp
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/common/BUILD.gn
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/common/extensions/api/app.json
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/common/extensions/api/declarative_content.json
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/common/extensions/api/proxy.json
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/common/extensions/api/schemas.gni
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/common/extensions/api/schemas.gypi
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/common/extensions/api/tts.json
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/common/extensions/api/tts_engine.json
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/common/extensions/api/types_private.json
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/chrome/common/extensions/chrome_extensions_client.cc
[delete] https://crrev.com/dd57fe1df3e5543459dbae29f2617d99958555ef/chrome/common/extensions_api_resources.grd
[modify] https://crrev.com/2d823a6736d032aa3215d1ee0994031bb0245e5b/tools/gritsettings/resource_ids

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 23 2016

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

commit 6498ddf9b7e71307fc49f6760f20e3a4a1f60c65
Author: rdevlin.cronin <rdevlin.cronin@chromium.org>
Date: Tue Aug 23 02:10:56 2016

[Extensions] Remove mechanism for non-generated schemas

As of https://codereview.chromium.org/2265663002/, all schemas should be
generated. Remove the mechanism for "unloaded" (ungenerated) schemas.

BUG= 638758 

Review-Url: https://codereview.chromium.org/2266673002
Cr-Commit-Position: refs/heads/master@{#413633}

[modify] https://crrev.com/6498ddf9b7e71307fc49f6760f20e3a4a1f60c65/chrome/common/extensions/api/common_extension_api_unittest.cc
[modify] https://crrev.com/6498ddf9b7e71307fc49f6760f20e3a4a1f60c65/chrome/common/extensions/chrome_extensions_client.cc
[modify] https://crrev.com/6498ddf9b7e71307fc49f6760f20e3a4a1f60c65/chrome/common/extensions/chrome_extensions_client.h
[modify] https://crrev.com/6498ddf9b7e71307fc49f6760f20e3a4a1f60c65/extensions/common/extension_api.cc
[modify] https://crrev.com/6498ddf9b7e71307fc49f6760f20e3a4a1f60c65/extensions/common/extension_api.h
[modify] https://crrev.com/6498ddf9b7e71307fc49f6760f20e3a4a1f60c65/extensions/common/extensions_client.h
[modify] https://crrev.com/6498ddf9b7e71307fc49f6760f20e3a4a1f60c65/extensions/shell/common/shell_extensions_client.cc
[modify] https://crrev.com/6498ddf9b7e71307fc49f6760f20e3a4a1f60c65/extensions/shell/common/shell_extensions_client.h
[modify] https://crrev.com/6498ddf9b7e71307fc49f6760f20e3a4a1f60c65/extensions/test/test_extensions_client.cc
[modify] https://crrev.com/6498ddf9b7e71307fc49f6760f20e3a4a1f60c65/extensions/test/test_extensions_client.h

Status: Fixed (was: Started)

Sign in to add a comment