New issue
Advanced search Search tips

Issue 781424 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jan 8
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

InterfacePtr::FlushForTesting() doesn't work for JS bindings

Project Member Reported by imch...@chromium.org, Nov 3 2017

Issue description

Background: I am working on updating the Media Router integration tests to make sure all pending callbacks for calls to the MediaRouteProvider interface are run before tearing down the test. To do that I call FlushForTesting() on the MediaRouteProviderPtr from C++ before the end of test.

The MediaRouteProvider interface is implemented in the extension and therefore uses JS bindings. However FlushForTesting() gets stuck. The reason is that the JS side a ReferenceError "RunInput.query_version is not currently set." (see gen/mojo/public/interfaces/bindings/interface_control_messages.mojom.js).

It seems to be triggered here: https://cs.chromium.org/chromium/src/mojo/public/js/lib/control_message_handler.js?dr&q=mojo/public/js/lib/control_message_handler&sq=package:chromium&l=65

If I modified the generated JS bindings to return undefined instead, then FlushForTesting() works fine.
 
That is because the JS bindings is the old one that is going to be deprecated.
The new JS bindings should work.

Is this an urgent issue? I am making changes to move things to the new bindings.
Nope, this is not exactly urgent since we usually run our tests on release builds, so the untriggered callback DCHECK doesn't happen there in the first place.
Then I won't bother fixing the old JS bindings. Instead I will focus on moving media router away from it.
Status: Fixed (was: Untriaged)
This works in the new JS bindings.

Sign in to add a comment