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

Issue 69843003: Implement Mojo message codec in JavaScript (Closed)

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

Description

Implement Mojo message codec in JavaScript This CL contains an encoder and decoder for the Mojo message IPC format. I've tested the encoder and decoder against each other, but I haven't yet tested them against the C++ implementation. I haven't tried to tune the encoder or decoder for performance. IMHO, we should work on that after getting correctness. The C++ code for JSTest.codec is a bit verbose because the C++ code need to load all the dependencies for codec_unittests.js. A better approach is to teach the system how to load dependencies from the file system, but I've left that for a future CL. BUG=317398 R=aa@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=235838

Patch Set 1 #

Patch Set 2 : Fix handle decoding #

Patch Set 3 : Fix bugs #

Patch Set 4 : Structs #

Total comments: 9

Patch Set 5 : codec1 #

Patch Set 6 : Mostly happy with the structure #

Patch Set 7 : Executes but fails #

Patch Set 8 : Seems to work! #

Total comments: 8

Patch Set 9 : rebase #

Patch Set 10 : Address Aaron's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+738 lines, -152 lines) Patch
M gin/modules/module_registry.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M gin/modules/module_runner_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download
M gin/modules/module_runner_delegate.cc View 1 2 3 4 5 6 7 8 2 chunks +18 lines, -0 lines 0 comments Download
M gin/test/file_runner.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -2 lines 0 comments Download
M gin/test/file_runner.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -11 lines 0 comments Download
M gin/test/gtest.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -1 line 0 comments Download
M gin/test/gtest.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -2 lines 0 comments Download
M mojo/mojo.gyp View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -4 lines 0 comments Download
A mojo/public/bindings/js/codec.js View 1 2 3 4 5 6 7 8 9 1 chunk +407 lines, -0 lines 0 comments Download
A mojo/public/bindings/js/codec_unittests.js View 1 2 3 4 5 6 7 8 1 chunk +164 lines, -0 lines 0 comments Download
M mojo/public/bindings/js/core.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -1 line 0 comments Download
M mojo/public/bindings/js/core.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -2 lines 0 comments Download
M mojo/public/bindings/js/core_unittests.js View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -1 line 0 comments Download
D mojo/public/bindings/js/global.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -18 lines 0 comments Download
D mojo/public/bindings/js/global.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -33 lines 0 comments Download
D mojo/public/bindings/js/runner_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -31 lines 0 comments Download
D mojo/public/bindings/js/runner_delegate.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -35 lines 0 comments Download
M mojo/public/bindings/js/test/run_js_tests.cc View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -11 lines 0 comments Download
A mojo/public/bindings/js/test/sample_service.js View 1 2 3 4 5 6 7 8 1 chunk +99 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
abarth-chromium
Here's an early work-in-progress of the bindings serialization library in JavaScript. I'd appreciate early feedback ...
7 years, 1 month ago (2013-11-12 02:10:20 UTC) #1
abarth-chromium
I've uploaded a new work-in-progress that gets all the way up to encoding and decoding ...
7 years, 1 month ago (2013-11-12 23:56:51 UTC) #2
Aaron Boodman
https://codereview.chromium.org/69843003/diff/80001/mojo/public/bindings/js/codec.js File mojo/public/bindings/js/codec.js (right): https://codereview.chromium.org/69843003/diff/80001/mojo/public/bindings/js/codec.js#newcode7 mojo/public/bindings/js/codec.js:7: function store8(memory, ptr, val) { What is intended to ...
7 years, 1 month ago (2013-11-13 19:32:36 UTC) #3
abarth-chromium
Thanks for taking a look. https://codereview.chromium.org/69843003/diff/80001/mojo/public/bindings/js/codec.js File mojo/public/bindings/js/codec.js (right): https://codereview.chromium.org/69843003/diff/80001/mojo/public/bindings/js/codec.js#newcode7 mojo/public/bindings/js/codec.js:7: function store8(memory, ptr, val) ...
7 years, 1 month ago (2013-11-13 19:41:51 UTC) #4
abarth-chromium
I made a bunch of progress today and I've updated my work-in-progress patch. This CL ...
7 years, 1 month ago (2013-11-15 02:38:59 UTC) #5
abarth-chromium
Ok, this CL is ready for review. Unit testing found lots of bugs in codec.js, ...
7 years, 1 month ago (2013-11-15 19:25:13 UTC) #6
abarth-chromium
@Dave: You might be interested in reviewing this CL as well.
7 years, 1 month ago (2013-11-16 16:12:08 UTC) #7
abarth-chromium
https://codereview.chromium.org/69843003/diff/240001/mojo/public/bindings/js/test/run_js_tests.cc File mojo/public/bindings/js/test/run_js_tests.cc (right): https://codereview.chromium.org/69843003/diff/240001/mojo/public/bindings/js/test/run_js_tests.cc#newcode49 mojo/public/bindings/js/test/run_js_tests.cc:49: // teach the module loading system how to find ...
7 years, 1 month ago (2013-11-17 20:07:05 UTC) #8
Aaron Boodman
lgtm https://codereview.chromium.org/69843003/diff/80001/mojo/public/bindings/js/codec.js File mojo/public/bindings/js/codec.js (right): https://codereview.chromium.org/69843003/diff/80001/mojo/public/bindings/js/codec.js#newcode124 mojo/public/bindings/js/codec.js:124: // buffer using v8::String::NewFromUtf8. On 2013/11/13 19:41:51, abarth ...
7 years, 1 month ago (2013-11-18 18:34:48 UTC) #9
abarth-chromium
I've rebased this now that gin_shell has landed and it's much cleaner.
7 years, 1 month ago (2013-11-18 18:57:30 UTC) #10
abarth-chromium
On 2013/11/18 18:57:30, abarth wrote: > I've rebased this now that gin_shell has landed and ...
7 years, 1 month ago (2013-11-18 19:11:03 UTC) #11
abarth-chromium
https://codereview.chromium.org/69843003/diff/240001/mojo/public/bindings/js/codec.js File mojo/public/bindings/js/codec.js (right): https://codereview.chromium.org/69843003/diff/240001/mojo/public/bindings/js/codec.js#newcode5 mojo/public/bindings/js/codec.js:5: define("codec", function() { On 2013/11/18 18:34:48, Aaron Boodman wrote: ...
7 years, 1 month ago (2013-11-18 19:13:19 UTC) #12
abarth-chromium
Fixed. There are some more C++ changes in this CL if you'd like to take ...
7 years, 1 month ago (2013-11-18 19:16:58 UTC) #13
Aaron Boodman
Oh, I did. Yay.
7 years, 1 month ago (2013-11-18 20:15:20 UTC) #14
Aaron Boodman
lgtm - sorry I meant to lgtm and forget on last round. On Mon, Nov ...
7 years, 1 month ago (2013-11-18 20:15:40 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/abarth@chromium.org/69843003/410001
7 years, 1 month ago (2013-11-18 21:12:03 UTC) #16
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) content_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=226008
7 years, 1 month ago (2013-11-18 22:20:27 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/abarth@chromium.org/69843003/410001
7 years, 1 month ago (2013-11-18 22:49:20 UTC) #18
abarth-chromium
7 years, 1 month ago (2013-11-18 23:05:17 UTC) #19
Message was sent while issue was closed.
Committed patchset #10 manually as r235838 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698