Extension schemas are double-parsed in the renderer |
|||
Issue descriptionIn order to pass the extension schema to JS, we do the following: 1. Parse the schema string to a base::DictionaryValue 2. Modify it to prefix types 3. Convert from a base::DictionaryValue to a v8::Value issue 638735 is handling removing 2, which means we would go from string -> dictionary value -> v8::Value. However, v8 offers a JSON::Parse API. Theoretically, we should be able to go straight from string -> v8::Value, which would cut down on both parsing and copying the data.
,
Aug 26 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2fdf3d97334819323dc2f42e79fb9d897b069ec4 commit 2fdf3d97334819323dc2f42e79fb9d897b069ec4 Author: rdevlin.cronin <rdevlin.cronin@chromium.org> Date: Fri Aug 26 16:11:32 2016 [Extensions] Parse schema string directly into a v8 object In the renderer, we need to parse the extension schema string and pass it to JS in order to create our bindings. However, right now, we first parse this into a DictionaryValue, and then convert it into a v8::Object. However, now that we fully generate all the schema code, we should be able to parse it directly from a string into a v8::Object. BUG= 640247 Review-Url: https://codereview.chromium.org/2271813003 Cr-Commit-Position: refs/heads/master@{#414725} [modify] https://crrev.com/2fdf3d97334819323dc2f42e79fb9d897b069ec4/extensions/common/extension_api.cc [modify] https://crrev.com/2fdf3d97334819323dc2f42e79fb9d897b069ec4/extensions/common/extension_api.h [modify] https://crrev.com/2fdf3d97334819323dc2f42e79fb9d897b069ec4/extensions/renderer/v8_schema_registry.cc
,
Aug 29 2016
,
Aug 29 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by rdevlin....@chromium.org
, Aug 25 2016