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

Issue 2744963002: Introduce InterfaceEndpointClient(IEC), InterfaceEndpointHandle and (Closed)

Created:
3 years, 9 months ago by wangjimmy
Modified:
3 years, 8 months ago
CC:
Aaron Boodman, abarth-chromium, chromium-apps-reviews_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, Eugene But (OOO till 7-30), extensions-reviews_chromium.org, jam, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce InterfaceEndpointClient(IEC), InterfaceEndpointHandle and PipeControlMessage Handler/Proxy. Move accept message and handling code from Router to IEC. There is still only 1 interface on a message pipe, but this work helps setup for associated interfaces. BUG=695635 Review-Url: https://codereview.chromium.org/2744963002 Cr-Commit-Position: refs/heads/master@{#460817} Committed: https://chromium.googlesource.com/chromium/src/+/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486

Patch Set 1 #

Patch Set 2 : Add closeWithReason to IEC which is called by InterfacePtrController & Binding. Add tests. #

Patch Set 3 : Add module loading support for Timer for different test env #

Patch Set 4 : Resolve Merge with new changes from master. #

Total comments: 8

Patch Set 5 : Remove default function parameters so it will run on ios safari 9. #

Patch Set 6 : Remove default values from destructuring parameters. Not supported on ios 9. #

Patch Set 7 : Fix failing JSTest.Validation #

Patch Set 8 : Add validator.clearTestingMode() for clearing the ValidationErrorObserverForTesting singleton. #

Patch Set 9 : Modify connection and interfacePtr tests in their new layout tests. #

Patch Set 10 : Add binding.html layout test for connection error with reason. Reset IEC when reset() or close()… #

Total comments: 60

Patch Set 11 : Code formatting. Update State close in IEH. Use IEC.closeWithReason in Binding's close/reset. #

Total comments: 22

Patch Set 12 : Find or create a new endpoint in Router. Add check in Router. Fix logic. Code formatting. #

Patch Set 13 : Modify test harness expected output txt because of interface_definition.tmpl changes. Edit module.a… #

Total comments: 2

Patch Set 14 : Throw the error with the string being the stack trace needed to debug layouts which don't output an… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1036 lines, -219 lines) Patch
M content/content_resources.grd View 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/mojo_context_state.cc View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download
M extensions/renderer/api_test_base.cc View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M extensions/renderer/dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +9 lines, -0 lines 0 comments Download
M ios/web/ios_web_resources.grd View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M ios/web/webui/crw_web_ui_manager.mm View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
M ios/web/webui/mojo_js_constants.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ios/web/webui/mojo_js_constants.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ios/web/webui/resources/console.js View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download
A ios/web/webui/resources/timer.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +38 lines, -0 lines 0 comments Download
M mojo/edk/js/tests/run_js_unittests.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M mojo/public/js/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M mojo/public/js/bindings.js View 1 2 3 4 5 6 7 8 9 10 11 12 chunks +61 lines, -24 lines 0 comments Download
M mojo/public/js/codec.js View 1 3 chunks +8 lines, -4 lines 0 comments Download
M mojo/public/js/connector.js View 1 2 3 2 chunks +4 lines, -5 lines 0 comments Download
M mojo/public/js/constants.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M mojo/public/js/constants.cc View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M mojo/public/js/interface_types.js View 2 chunks +18 lines, -0 lines 0 comments Download
M mojo/public/js/lib/control_message_handler.js View 2 chunks +5 lines, -5 lines 0 comments Download
M mojo/public/js/lib/control_message_proxy.js View 3 chunks +13 lines, -11 lines 0 comments Download
A mojo/public/js/lib/interface_endpoint_client.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +232 lines, -0 lines 0 comments Download
A mojo/public/js/lib/interface_endpoint_handle.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +158 lines, -0 lines 0 comments Download
A mojo/public/js/lib/pipe_control_message_handler.js View 1 1 chunk +61 lines, -0 lines 0 comments Download
A mojo/public/js/lib/pipe_control_message_proxy.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +56 lines, -0 lines 0 comments Download
M mojo/public/js/router.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +207 lines, -141 lines 0 comments Download
M mojo/public/js/tests/validation_unittest.js View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -9 lines 0 comments Download
M mojo/public/js/validator.js View 1 2 3 4 5 6 7 8 9 10 3 chunks +48 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl View 1 2 chunks +3 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/mojo/binding.html View 1 2 3 4 5 6 7 8 9 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/mojo/connection.html View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/mojo/interface_ptr.html View 1 2 3 4 5 6 7 8 9 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/vibration/vibration-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/vibration/vibration-iframe-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 71 (51 generated)
wangjimmy
[38036:1027:0317/212029.166458:35825003907766:ERROR:crw_web_controller.mm(2685)] JavaScript error: Error: Load timeout for modules: main,mojo/public/js/router,mojo/public/js/lib/interface_endpoint_handle Hey Eugene, I'm getting this error ...
3 years, 9 months ago (2017-03-20 17:56:23 UTC) #14
Eugene But (OOO till 7-30)
>> main,mojo/public/js/router,mojo/public/js/lib/interface_endpoint_handle >> Hey Eugene, I'm getting this error in my try run "ios_simulator" when ...
3 years, 9 months ago (2017-03-20 20:53:46 UTC) #15
wangjimmy
Hey Eugune, PTAL at ios/web/webui Also I added the "TODO(crbug.com/703380): When the Mojo JS bindings ...
3 years, 9 months ago (2017-03-21 16:53:37 UTC) #23
Eugene But (OOO till 7-30)
ios lgtm
3 years, 9 months ago (2017-03-21 17:12:17 UTC) #24
wangjimmy
Hey Ken, PTAL at extensions/
3 years, 9 months ago (2017-03-21 19:56:31 UTC) #28
wangjimmy
Hi John, PTAL at content/. Thanks!
3 years, 9 months ago (2017-03-21 19:57:50 UTC) #30
wangjimmy
Hi Yuzhu, PTAL at mojo/ and third_party/WebKit/LayoutTests/mojo/connection.html third_party/WebKit/LayoutTests/mojo/interface_ptr.html
3 years, 9 months ago (2017-03-21 20:31:59 UTC) #34
Ken Rockot(use gerrit already)
extensions lgtm
3 years, 9 months ago (2017-03-21 23:19:06 UTC) #35
jam
lgtm
3 years, 9 months ago (2017-03-22 00:04:29 UTC) #36
yzshen1
First part of comments. Sorry for the delay! https://codereview.chromium.org/2744963002/diff/180001/ios/web/webui/resources/timer.js File ios/web/webui/resources/timer.js (right): https://codereview.chromium.org/2744963002/diff/180001/ios/web/webui/resources/timer.js#newcode10 ios/web/webui/resources/timer.js:10: // ...
3 years, 9 months ago (2017-03-24 21:20:13 UTC) #41
wangjimmy
https://codereview.chromium.org/2744963002/diff/180001/ios/web/webui/resources/timer.js File ios/web/webui/resources/timer.js (right): https://codereview.chromium.org/2744963002/diff/180001/ios/web/webui/resources/timer.js#newcode10 ios/web/webui/resources/timer.js:10: // and createOneShot, createRepeating is not always available. On ...
3 years, 9 months ago (2017-03-27 16:51:28 UTC) #46
yzshen1
A few more comments. I think it mostly looks good. Thanks! https://codereview.chromium.org/2744963002/diff/200001/mojo/public/js/bindings.js File mojo/public/js/bindings.js (right): ...
3 years, 9 months ago (2017-03-28 00:46:00 UTC) #47
wangjimmy
https://codereview.chromium.org/2744963002/diff/200001/mojo/public/js/bindings.js File mojo/public/js/bindings.js (right): https://codereview.chromium.org/2744963002/diff/200001/mojo/public/js/bindings.js#newcode39 mojo/public/js/bindings.js:39: this.controlMessageProxy_ = null; On 2017/03/28 00:45:59, yzshen1 wrote: > ...
3 years, 8 months ago (2017-03-29 17:01:19 UTC) #56
yzshen1
LGTM Thanks! https://codereview.chromium.org/2744963002/diff/240001/mojo/public/js/router.js File mojo/public/js/router.js (right): https://codereview.chromium.org/2744963002/diff/240001/mojo/public/js/router.js#newcode36 mojo/public/js/router.js:36: throw new Error(output); [Just to double check] ...
3 years, 8 months ago (2017-03-29 22:05:35 UTC) #57
wangjimmy
> https://codereview.chromium.org/2744963002/diff/240001/mojo/public/js/router.js#newcode36 > mojo/public/js/router.js:36: throw new Error(output); > [Just to double check] It seems the ...
3 years, 8 months ago (2017-03-30 00:02:22 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2744963002/260001
3 years, 8 months ago (2017-03-30 17:41:55 UTC) #65
commit-bot: I haz the power
Committed patchset #14 (id:260001) as https://chromium.googlesource.com/chromium/src/+/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486
3 years, 8 months ago (2017-03-30 17:51:01 UTC) #68
kolos1
A revert of this CL (patchset #14 id:260001) has been created in https://codereview.chromium.org/2788403002/ by kolos@chromium.org. ...
3 years, 8 months ago (2017-04-03 10:56:10 UTC) #69
kolos1
On 2017/04/03 10:56:10, kolos1 wrote: > A revert of this CL (patchset #14 id:260001) has ...
3 years, 8 months ago (2017-04-03 11:06:53 UTC) #70
agrieve
3 years, 8 months ago (2017-04-03 14:37:27 UTC) #71
Message was sent while issue was closed.
On 2017/04/03 11:06:53, kolos1 wrote:
> On 2017/04/03 10:56:10, kolos1 wrote:
> > A revert of this CL (patchset #14 id:260001) has been created in
> > https://codereview.chromium.org/2788403002/ by mailto:kolos@chromium.org.
> > 
> > The reason for reverting is: This CL makes
> > BluetoothInternalsTest.Startup_BluetoothInternals flaky. See FindIt report
> >
>
https://findit-for-me.appspot.com/waterfall/failure?url=https%3A%2F%2Fbuild.c...
> > 
> > Also check details in the bug.
> > BUG=707725.
> 
> I requested reverting, but realized that this CL doesn't touch any bluetooth
> stuff. So, the test should be disable. I canceled reverting.

This increased android libchrome.so by 20kb. Made a note this on existing mojo
size bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=597125

Powered by Google App Engine
This is Rietveld 408576698