Hi Ken, chromium-mojo et. al. thanks for your quick reply!
The pointer to
speech_recognition_service.mojom.cc and the params traits file is super helpful! I wasn't sure where these generated files lived before but now knowing what to look for will really help in the future.
To answer your questions:
1.) I would like to say that I can confirm that sink_->Accept is failing, however because of the oddness of what I've been experiencing I wouldn't rule it out that I'm chasing a red-herring here. I have decorated MessageDispatcher::Accept with the following log:
```
bool MessageDispatcher::Accept(Message* message) {
internal::MessageDispatchContext dispatch_context(message);
DCHECK(sink_);
if (validator_) {
if (!validator_->Accept(message)) {
LOG(WARNING) << "VALIDATOR REJECTS MESSAGE!";
return false;
}
}
if (!filter_) {
const bool accepted = sink_->Accept(message);
if (!accepted) {
LOG(WARNING) << "Rejected by sink!";
}
return accepted;
}
...
```
In logs I can see "Rejected by sink!" right before my test fails, so I think it's reasonable to think that sink_->Accept is failing here.
2.) I added some logs to that params traits file, however they are never invoked (including a log to mark the start of the Read function you linked) So it seems like there's something I'm missing here...
So that being said I went ahead and started playing with some debug logs in the AudioSourceFetcherStubDispatch::Accept method and unfortunately I think that either I'm putting logs in the wrong file or whatever functions are pushed onto the stack between sink_->Accept in MessageDispatcher and AudioSourceFetcherStubDispatch::Accept are rejecting the request before it gets to the StubDispatch's Accept method.
I have been able to produce logs from AudioSourceFetcherProxy::Start, which I have determined executes correctly. I suppose this isn't surprising because it seems like ::mojo::internal::SendMojoMessage looks like it probably preempts Accept on the message dispatcher side.
In the case that I may be putting my logs in the wrong file, could you confirm that I'm using the right generated files?
- I'm building chromium in my out/Default directory with the shell-less flow.
- (I don't think this is relevant but my
args.gn for out/Default are:)
-blink_symbol_level = 0
dcheck_always_on = true
target_os = "chromeos"
use_clang_coverage = true
is_component_build = true
use_remoteexec = true
ffmpeg_branding = "ChromeOS"
is_debug = false
- So given those pre-conditions I would expect to find the generated mojom file in: out/Default/gen/media/mojo/mojom/
speech_recognition_service.mojom.ccIn the case that sink_->Accept calls something else before the StubDispatch's Accept method, is there any documentation on where that call goes? I'm guessing that sink_ IS the stub dispatcher but unfortunately with 60k overrides I don't actually know what tool I would use to verify that. Code Search refuses to run the full query on the overrides of sink_->Accept from what I've been able to tell.
If it might help, I'll add the context that I haven't made any changes to the params object, either how it is initialized or its structure as far as I can tell. The actual changes in the CL change the FakeSpeechRecognitionService such that it is only responsible for binding self-owned receivers implemented by my new FakeSpeechRecognizer class and then passing references to the FakeSpeechRecognizer class back to the testing class.
I have uploaded a new patch to the CL that includes the Logs I've added to the param traits, because my out/* dir is gitignored I can't upload the logs in the generated file.
Thank you so much for helping, I'm sorry about the length of this message there's just a lot of context!