[go: up one dir, main page]

Check the tab ID before delivering an extension message.

r335753 changed extension messaging to use RenderFrames, which had the
side-effect of delivering messages to every RenderFrame in a process,
which may include other tabs.

This patch fixes that by sending the target tab ID along with the message. A
more principled fix would have been to track RenderFrames on the browser and
send to precisely the right ones, but this would need to be part of a more
comprehensive refactor.

I also fixed up ExtensionApiTest.Connect and re-enabled, which was disabled
years ago due to flakiness. Hopefully my test JS changes will fix that.

BUG=520303
TBR=rdevlin.cronin@chromium.org, dcheng@chromium.org
NOPRESUBMIT=true
NOTRY=true

Review URL: https://codereview.chromium.org/1318153002

Cr-Commit-Position: refs/heads/master@{#346176}
(cherry picked from commit 1344c7dfde448d4b80693f597b02993b7f6bbd5b)

Review URL: https://codereview.chromium.org/1335743003

Cr-Commit-Position: refs/branch-heads/2454@{#455}
Cr-Branched-From: 12bfc3360892ec53cd00fc239a47e5298beb063b-refs/heads/master@{#338390}
12 files changed