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 90203002: [Mojo] Remove static "bootstrap" state in mojo_js (Closed)

Created:
7 years ago by abarth-chromium
Modified:
7 years ago
Reviewers:
Aaron Boodman
CC:
chromium-reviews, Aaron Boodman, darin (slow to review), viettrungluu+watch_chromium.org, ben+mojo_chromium.org
Visibility:
Public.

Description

[Mojo] Remove static "bootstrap" state in mojo_js This CL removes the static static in boostrap.cc that we used to transfer the initial handle from C++ into JavaScript. Rather that storing the initial handle in static state and evaling some script to kick off the loading process, we now use an API to load a module by name and then pass the initial handle to the function defined by that module. This CL paves the say for adding threading support to mojo_js. The previous static approach didn't scale to multiple threads, but the approach in this CL does. I'll actually add the API to create a thread in the next CL. R=aa@chromium.org BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=237647

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : Merge with aa's changes #

Total comments: 19

Patch Set 4 : Rebase and fix nit #

Patch Set 5 : Address aa's comments #

Patch Set 6 : CHECK, CHECK, CHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -137 lines) Patch
M gin/modules/module_registry.h View 1 2 3 4 5 chunks +13 lines, -0 lines 0 comments Download
M gin/modules/module_registry.cc View 1 2 3 4 4 chunks +32 lines, -6 lines 0 comments Download
M gin/modules/module_runner_delegate.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M gin/modules/module_runner_delegate.cc View 2 chunks +8 lines, -4 lines 0 comments Download
D mojo/apps/js/bootstrap.h View 1 chunk +0 lines, -26 lines 0 comments Download
D mojo/apps/js/bootstrap.cc View 1 chunk +0 lines, -56 lines 0 comments Download
M mojo/apps/js/main.cc View 3 chunks +7 lines, -12 lines 0 comments Download
M mojo/apps/js/main.js View 2 chunks +11 lines, -7 lines 0 comments Download
M mojo/apps/js/mojo_runner_delegate.h View 2 chunks +3 lines, -0 lines 0 comments Download
M mojo/apps/js/mojo_runner_delegate.cc View 1 2 3 4 5 3 chunks +25 lines, -2 lines 0 comments Download
A + mojo/apps/js/threading.h View 2 chunks +4 lines, -7 lines 0 comments Download
A + mojo/apps/js/threading.cc View 1 2 3 chunks +3 lines, -15 lines 0 comments Download
M mojo/mojo.gyp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
abarth-chromium
PTAL. Thanks!
7 years ago (2013-11-27 01:29:13 UTC) #1
Aaron Boodman
https://codereview.chromium.org/90203002/diff/40001/gin/modules/module_registry.cc File gin/modules/module_registry.cc (right): https://codereview.chromium.org/90203002/diff/40001/gin/modules/module_registry.cc#newcode141 gin/modules/module_registry.cc:141: if (available_modules_.count(id)) { I think that the implicit int->bool ...
7 years ago (2013-11-27 19:02:41 UTC) #2
abarth-chromium
Patch updated. https://codereview.chromium.org/90203002/diff/40001/gin/modules/module_registry.cc File gin/modules/module_registry.cc (right): https://codereview.chromium.org/90203002/diff/40001/gin/modules/module_registry.cc#newcode141 gin/modules/module_registry.cc:141: if (available_modules_.count(id)) { On 2013/11/27 19:02:41, Aaron ...
7 years ago (2013-11-27 19:18:09 UTC) #3
Aaron Boodman
lgtm https://codereview.chromium.org/90203002/diff/40001/mojo/apps/js/mojo_runner_delegate.cc File mojo/apps/js/mojo_runner_delegate.cc (right): https://codereview.chromium.org/90203002/diff/40001/mojo/apps/js/mojo_runner_delegate.cc#newcode41 mojo/apps/js/mojo_runner_delegate.cc:41: if (!gin::ConvertFromV8(module, &start)) { On 2013/11/27 19:18:09, abarth ...
7 years ago (2013-11-27 20:35:49 UTC) #4
abarth-chromium
On 2013/11/27 20:35:49, Aaron Boodman wrote: > But we control main.js. It seems like if ...
7 years ago (2013-11-27 21:28:48 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/abarth@chromium.org/90203002/100001
7 years ago (2013-11-27 22:13:52 UTC) #6
abarth-chromium
7 years ago (2013-11-28 00:00:35 UTC) #7
Message was sent while issue was closed.
Committed patchset #6 manually as r237647 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698