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

Issue 638735 link

Starred by 2 users

Issue metadata

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

Blocked on:
issue 638758

Blocking:
issue 636655
issue 640247



Sign in to add a comment

ExtensionAPI::GetSchema modifies the schema string

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

Issue description

ExtensionAPI::GetSchema() loads the schema from the generated string, parses it into a dictionary value, and then mangles all the types to prefix them with the namespace id (so that e.g. StorageArea becomes storage.StorageArea).  But the string is generated from cpp_bundle_generator.py and I think is only used for this purpose, so we should just generate it correctly the first time, and avoid doing any modification.
 
Components: Platform>Extensions
Blockedon: 638758
Blocking: 640247
Project Member

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

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

commit d0e853f951e0f59821d51003000d24cf9a4239a7
Author: rdevlin.cronin <rdevlin.cronin@chromium.org>
Date: Tue Aug 23 22:35:06 2016

[Extensions] Prefix extension apis in the generation step

We prefix extension API types with the namespace of the API they are in
so that we can look them up easily. Right now, this is done at runtime
by traversing a dictionary value and modifying each of the values.
But since we generate all extension APIs with  crbug.com/638758 , we can
move this step into the generation, and avoid doing it at runtime.

BUG= 638735 

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

[modify] https://crrev.com/d0e853f951e0f59821d51003000d24cf9a4239a7/chrome/common/extensions/api/common_extension_api_unittest.cc
[modify] https://crrev.com/d0e853f951e0f59821d51003000d24cf9a4239a7/extensions/common/extension_api.cc
[modify] https://crrev.com/d0e853f951e0f59821d51003000d24cf9a4239a7/extensions/common/extension_api.h
[modify] https://crrev.com/d0e853f951e0f59821d51003000d24cf9a4239a7/tools/json_schema_compiler/cpp_bundle_generator.py

Status: Fixed (was: Started)

Sign in to add a comment