Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Issue 9386001: Implement a module system for the extension bindings JS. (Closed)

Created:
8 years, 10 months ago by koz (OOO until 15th September)
Modified:
8 years, 9 months ago
CC:
chromium-reviews, jam, achuith+watch_chromium.org, mihaip+watch_chromium.org, joi+watch-content_chromium.org, rginda+watch_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 30

Patch Set 2 : re-jigged to use ModuleSystem #

Total comments: 32

Patch Set 3 : respond to comments #

Patch Set 4 : add TODO #

Patch Set 5 : fix compile errors #

Total comments: 33

Patch Set 6 : add comment #

Patch Set 7 : base files missing? #

Total comments: 3

Patch Set 8 : respond to comments #

Patch Set 9 : rebase and fix tests #

Patch Set 10 : fix windows compile #

Patch Set 11 : add missing webstore bindings #

Patch Set 12 : re-apply #

Patch Set 13 : remove Persistent<> to fix perf regression #

Patch Set 14 : optimise require and setup_bindings #

Patch Set 15 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+911 lines, -1170 lines) Patch
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -1 line 0 comments Download
M chrome/renderer/extensions/app_bindings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +19 lines, -6 lines 0 comments Download
M chrome/renderer/extensions/app_bindings.cc View 1 2 3 4 5 6 7 8 6 chunks +28 lines, -80 lines 0 comments Download
M chrome/renderer/extensions/chrome_private_custom_bindings.h View 1 1 chunk +1 line, -6 lines 0 comments Download
M chrome/renderer/extensions/chrome_private_custom_bindings.cc View 1 2 chunks +3 lines, -16 lines 0 comments Download
M chrome/renderer/extensions/chrome_v8_context.h View 1 2 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/chrome_v8_extension.h View 1 2 3 chunks +4 lines, -37 lines 0 comments Download
M chrome/renderer/extensions/chrome_v8_extension.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +2 lines, -97 lines 0 comments Download
M chrome/renderer/extensions/chrome_v8_extension_handler.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/context_menus_custom_bindings.h View 1 1 chunk +1 line, -4 lines 0 comments Download
M chrome/renderer/extensions/context_menus_custom_bindings.cc View 1 2 chunks +8 lines, -17 lines 0 comments Download
M chrome/renderer/extensions/custom_bindings_util.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/custom_bindings_util.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -77 lines 0 comments Download
M chrome/renderer/extensions/event_bindings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M chrome/renderer/extensions/event_bindings.cc View 1 2 3 4 5 5 chunks +18 lines, -25 lines 0 comments Download
M chrome/renderer/extensions/experimental.socket_custom_bindings.h View 1 1 chunk +1 line, -5 lines 0 comments Download
M chrome/renderer/extensions/experimental.socket_custom_bindings.cc View 1 1 chunk +8 lines, -18 lines 0 comments Download
M chrome/renderer/extensions/extension_custom_bindings.h View 1 1 chunk +1 line, -7 lines 0 comments Download
M chrome/renderer/extensions/extension_custom_bindings.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -20 lines 0 comments Download
M chrome/renderer/extensions/extension_dispatcher.h View 1 2 3 4 5 6 7 8 4 chunks +16 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/extension_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 10 chunks +257 lines, -71 lines 0 comments Download
M chrome/renderer/extensions/file_browser_handler_custom_bindings.h View 1 1 chunk +1 line, -5 lines 0 comments Download
M chrome/renderer/extensions/file_browser_handler_custom_bindings.cc View 1 2 chunks +10 lines, -18 lines 0 comments Download
M chrome/renderer/extensions/file_browser_private_custom_bindings.h View 1 1 chunk +1 line, -5 lines 0 comments Download
M chrome/renderer/extensions/file_browser_private_custom_bindings.cc View 1 2 chunks +7 lines, -16 lines 0 comments Download
M chrome/renderer/extensions/i18n_custom_bindings.h View 1 1 chunk +1 line, -4 lines 0 comments Download
M chrome/renderer/extensions/i18n_custom_bindings.cc View 1 2 1 chunk +3 lines, -15 lines 0 comments Download
M chrome/renderer/extensions/json_schema_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -9 lines 0 comments Download
M chrome/renderer/extensions/miscellaneous_bindings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M chrome/renderer/extensions/miscellaneous_bindings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +9 lines, -24 lines 0 comments Download
M chrome/renderer/extensions/page_actions_custom_bindings.h View 1 1 chunk +1 line, -7 lines 0 comments Download
M chrome/renderer/extensions/page_actions_custom_bindings.cc View 1 2 chunks +3 lines, -19 lines 0 comments Download
M chrome/renderer/extensions/page_capture_custom_bindings.h View 1 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/renderer/extensions/page_capture_custom_bindings.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -23 lines 0 comments Download
M chrome/renderer/extensions/schema_generated_bindings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M chrome/renderer/extensions/schema_generated_bindings.cc View 1 2 3 4 5 6 7 8 4 chunks +8 lines, -35 lines 0 comments Download
M chrome/renderer/extensions/tabs_custom_bindings.h View 1 1 chunk +1 line, -4 lines 0 comments Download
M chrome/renderer/extensions/tabs_custom_bindings.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -16 lines 0 comments Download
M chrome/renderer/extensions/tts_custom_bindings.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/tts_custom_bindings.cc View 1 1 chunk +7 lines, -19 lines 0 comments Download
M chrome/renderer/extensions/web_request_custom_bindings.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/web_request_custom_bindings.cc View 1 2 chunks +7 lines, -18 lines 0 comments Download
M chrome/renderer/extensions/webstore_bindings.h View 1 1 chunk +21 lines, -5 lines 0 comments Download
M chrome/renderer/extensions/webstore_bindings.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +10 lines, -63 lines 0 comments Download
M chrome/renderer/module_system.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +39 lines, -12 lines 0 comments Download
M chrome/renderer/module_system.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +69 lines, -51 lines 0 comments Download
M chrome/renderer/module_system_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +85 lines, -17 lines 0 comments Download
M chrome/renderer/native_handler.h View 1 2 3 4 5 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/renderer/native_handler.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/renderer/renderer_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
A chrome/renderer/resource_bundle_source_map.h View 1 2 3 4 5 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/renderer/resource_bundle_source_map.cc View 1 2 3 4 5 6 7 8 9 1 chunk +40 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/apitest.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +0 lines, -3 lines 0 comments Download
M chrome/renderer/resources/extensions/app.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -10 lines 0 comments Download
M chrome/renderer/resources/extensions/browser_action_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/chrome_private_custom_bindings.js View 1 2 3 4 5 6 7 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/content_settings_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +1 line, -7 lines 0 comments Download
M chrome/renderer/resources/extensions/context_menus_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +3 lines, -7 lines 0 comments Download
M chrome/renderer/resources/extensions/devtools_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/event.js View 1 2 3 4 5 6 7 2 chunks +5 lines, -8 lines 0 comments Download
M chrome/renderer/resources/extensions/experimental.declarative_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +1 line, -7 lines 0 comments Download
M chrome/renderer/resources/extensions/experimental.socket_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/extension_custom_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -8 lines 0 comments Download
M chrome/renderer/resources/extensions/file_browser_handler_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/file_browser_private_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +3 lines, -7 lines 0 comments Download
M chrome/renderer/resources/extensions/i18n_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/input.ime_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/json_schema.js View 1 2 3 4 5 6 7 8 2 chunks +1 line, -5 lines 0 comments Download
M chrome/renderer/resources/extensions/miscellaneous_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +10 lines, -12 lines 0 comments Download
M chrome/renderer/resources/extensions/omnibox_custom_bindings.js View 1 2 3 4 5 6 7 3 chunks +2 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/page_action_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/page_actions_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +5 lines, -7 lines 0 comments Download
M chrome/renderer/resources/extensions/page_capture_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +4 lines, -8 lines 0 comments Download
M chrome/renderer/resources/extensions/schema_generated_bindings.js View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -9 lines 0 comments Download
A chrome/renderer/resources/extensions/setup_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/storage_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +1 line, -7 lines 0 comments Download
M chrome/renderer/resources/extensions/tabs_custom_bindings.js View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -7 lines 0 comments Download
M chrome/renderer/resources/extensions/tts_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +3 lines, -7 lines 0 comments Download
M chrome/renderer/resources/extensions/tts_engine_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/types_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +1 line, -7 lines 0 comments Download
M chrome/renderer/resources/extensions/web_request_custom_bindings.js View 1 2 3 4 5 6 7 2 chunks +3 lines, -7 lines 0 comments Download
M chrome/renderer/resources/extensions/webstore.js View 1 2 3 4 5 6 7 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/renderer/resources/require.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -64 lines 0 comments Download
M chrome/test/base/chrome_render_view_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -15 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
koz (OOO until 15th September)
This change removes ExtensionDispatcher and friends' dependency on v8::Extensions and introduces an implementation of the ...
8 years, 10 months ago (2012-02-13 06:42:39 UTC) #1
koz (OOO until 15th September)
Also note that this change relies on an uncommitted WebKit change to plumb extension_group into ...
8 years, 10 months ago (2012-02-13 07:07:55 UTC) #2
Aaron Boodman
In general, I like the direction this is going. But I'm finding it hard to ...
8 years, 10 months ago (2012-02-13 23:24:14 UTC) #3
Aaron Boodman
On 2012/02/13 23:24:14, Aaron Boodman wrote: > In general, I like the direction this is ...
8 years, 10 months ago (2012-02-13 23:25:31 UTC) #4
Aaron Boodman
Pretty sweet. I need to think some more about the permissions aspect... It would be ...
8 years, 10 months ago (2012-02-16 01:54:42 UTC) #5
Aaron Boodman
On 2012/02/16 01:54:42, Aaron Boodman wrote: > Pretty sweet. > > I need to think ...
8 years, 10 months ago (2012-02-16 01:55:32 UTC) #6
koz (OOO until 15th September)
Thanks aa! Now that ModuleSystem has landed, this patch is substantially changed. I've responded to ...
8 years, 10 months ago (2012-02-27 01:06:14 UTC) #7
Aaron Boodman
+mpcomplete - I'd like a second set of eyes on this. As we discussed, please ...
8 years, 10 months ago (2012-02-28 02:42:59 UTC) #8
Matt Perry
https://chromiumcodereview.appspot.com/9386001/diff/12001/chrome/renderer/extensions/app_bindings.cc File chrome/renderer/extensions/app_bindings.cc (right): https://chromiumcodereview.appspot.com/9386001/diff/12001/chrome/renderer/extensions/app_bindings.cc#newcode64 chrome/renderer/extensions/app_bindings.cc:64: base::Bind(&AppBindings::GetIsInstalled, base::Unretained(this))); indent should be 4 spaces https://chromiumcodereview.appspot.com/9386001/diff/12001/chrome/renderer/extensions/event_bindings.cc File ...
8 years, 9 months ago (2012-02-28 20:34:19 UTC) #9
koz (OOO until 15th September)
https://chromiumcodereview.appspot.com/9386001/diff/12001/chrome/renderer/extensions/app_bindings.cc File chrome/renderer/extensions/app_bindings.cc (right): https://chromiumcodereview.appspot.com/9386001/diff/12001/chrome/renderer/extensions/app_bindings.cc#newcode64 chrome/renderer/extensions/app_bindings.cc:64: base::Bind(&AppBindings::GetIsInstalled, base::Unretained(this))); On 2012/02/28 20:34:20, Matt Perry wrote: > ...
8 years, 9 months ago (2012-03-01 03:41:55 UTC) #10
Aaron Boodman
Ever closer. On the upside, I feel like I really get this change now. https://chromiumcodereview.appspot.com/9386001/diff/30001/chrome/renderer/extensions/chrome_v8_extension_handler.h ...
8 years, 9 months ago (2012-03-01 07:24:25 UTC) #11
Aaron Boodman
https://chromiumcodereview.appspot.com/9386001/diff/30001/chrome/renderer/resources/require.js File chrome/renderer/resources/require.js (right): https://chromiumcodereview.appspot.com/9386001/diff/30001/chrome/renderer/resources/require.js#newcode36 chrome/renderer/resources/require.js:36: var wrappedSource = wrap(source); On 2012/03/01 07:24:26, Aaron Boodman ...
8 years, 9 months ago (2012-03-01 07:30:32 UTC) #12
Matt Perry
https://chromiumcodereview.appspot.com/9386001/diff/30001/chrome/renderer/extensions/event_bindings.cc File chrome/renderer/extensions/event_bindings.cc (right): https://chromiumcodereview.appspot.com/9386001/diff/30001/chrome/renderer/extensions/event_bindings.cc#newcode154 chrome/renderer/extensions/event_bindings.cc:154: g_listener_counts = LAZY_INSTANCE_INITIALIZER; If this is going to be ...
8 years, 9 months ago (2012-03-01 23:23:06 UTC) #13
koz (OOO until 15th September)
That's good. Hopefully this means that this module system is easier to understand than the ...
8 years, 9 months ago (2012-03-02 01:13:58 UTC) #14
Matt Perry
http://codereview.chromium.org/9386001/diff/34004/chrome/renderer/resources/extensions/apitest.js File chrome/renderer/resources/extensions/apitest.js (right): http://codereview.chromium.org/9386001/diff/34004/chrome/renderer/resources/extensions/apitest.js#newcode8 chrome/renderer/resources/extensions/apitest.js:8: (function() { This sort of extra wrapping can go ...
8 years, 9 months ago (2012-03-02 02:15:49 UTC) #15
koz (OOO until 15th September)
http://codereview.chromium.org/9386001/diff/34004/chrome/renderer/resources/extensions/apitest.js File chrome/renderer/resources/extensions/apitest.js (right): http://codereview.chromium.org/9386001/diff/34004/chrome/renderer/resources/extensions/apitest.js#newcode8 chrome/renderer/resources/extensions/apitest.js:8: (function() { On 2012/03/02 02:15:49, Matt Perry wrote: > ...
8 years, 9 months ago (2012-03-02 02:23:06 UTC) #16
not at google - send to devlin
http://codereview.chromium.org/9386001/diff/34004/chrome/renderer/resources/extensions/apitest.js File chrome/renderer/resources/extensions/apitest.js (right): http://codereview.chromium.org/9386001/diff/34004/chrome/renderer/resources/extensions/apitest.js#newcode8 chrome/renderer/resources/extensions/apitest.js:8: (function() { On 2012/03/02 02:23:06, koz wrote: > On ...
8 years, 9 months ago (2012-03-02 02:23:59 UTC) #17
Aaron Boodman
lgtm land it
8 years, 9 months ago (2012-03-02 03:14:44 UTC) #18
Matt Perry
lgtm
8 years, 9 months ago (2012-03-02 03:23:00 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/koz@chromium.org/9386001/43003
8 years, 9 months ago (2012-03-06 04:23:45 UTC) #20
commit-bot: I haz the power
Change committed as 125132
8 years, 9 months ago (2012-03-06 07:16:35 UTC) #21
Dan Beam
koz: I believe this CL has broken Win 7 Sync bots as they've been running ...
8 years, 9 months ago (2012-03-06 09:20:18 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/koz@chromium.org/9386001/51001
8 years, 9 months ago (2012-03-09 02:52:04 UTC) #23
commit-bot: I haz the power
Change committed as 125801
8 years, 9 months ago (2012-03-09 04:36:05 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/koz@chromium.org/9386001/59001
8 years, 9 months ago (2012-03-12 22:52:01 UTC) #25
koz (OOO until 15th September)
On 2012/03/12 22:52:01, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
8 years, 9 months ago (2012-03-12 22:53:54 UTC) #26
commit-bot: I haz the power
Change committed as 126306
8 years, 9 months ago (2012-03-13 02:09:44 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/koz@chromium.org/9386001/67001
8 years, 9 months ago (2012-03-16 00:31:46 UTC) #28
commit-bot: I haz the power
Can't apply patch for file chrome/renderer/extensions/miscellaneous_bindings.cc. While running patch -p1 --forward --force; patching file chrome/renderer/extensions/miscellaneous_bindings.cc ...
8 years, 9 months ago (2012-03-16 00:32:06 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/koz@chromium.org/9386001/71001
8 years, 9 months ago (2012-03-16 00:59:45 UTC) #30
commit-bot: I haz the power
Failed to request the patch to try. Please note that binary filesare still unsupported at ...
8 years, 9 months ago (2012-03-16 04:43:57 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/koz@chromium.org/9386001/71001
8 years, 9 months ago (2012-03-16 04:44:08 UTC) #32
commit-bot: I haz the power
Failed to request the patch to try. Please note that binary filesare still unsupported at ...
8 years, 9 months ago (2012-03-16 04:46:14 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/koz@chromium.org/9386001/71001
8 years, 9 months ago (2012-03-16 04:50:09 UTC) #34
commit-bot: I haz the power
Change committed as 127117
8 years, 9 months ago (2012-03-16 06:25:33 UTC) #35
Timur Iskhodzhanov
8 years, 9 months ago (2012-03-16 15:30:33 UTC) #36
FYI, this has introduced quite a few leaks:
http://code.google.com/p/chromium/issues/detail?id=118575

Powered by Google App Engine
This is Rietveld 408576698