Commit 590898ac authored by John Chen's avatar John Chen Committed by Commit Bot

[ChromeDriver] Ignore non-iframe target messages

ChromeDriver is only interested in Target.receivedMessageFromTarget
events from iframe targets. Ignore messages from other types of
targets, instead of returning errors.

Bug: b:76419159
Change-Id: I1e8545aa780d35d2069e4443e674b892ad272151
Reviewed-on: https://chromium-review.googlesource.com/991597Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547609}
parent c82ae4e7
......@@ -460,7 +460,10 @@ Status DevToolsClientImpl::ProcessEvent(const internal::InspectorEvent& event) {
kUnknownError,
"missing sessionId in Target.receivedMessageFromTarget event");
if (children_.count(session_id) == 0)
return Status(kUnknownError, "unknown sessionId");
// ChromeDriver only cares about iframe targets. If we don't know about
// this sessionId, then it must be of a different target type and should
// be ignored.
return Status(kOk);
DevToolsClientImpl* child = children_[session_id];
std::string message;
if (!event.params->GetString("message", &message))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment