Attention is currently required from: Andrey Kosyakov.
Dmitry Gozman would like Andrey Kosyakov to review this change.
CDP: fix Page.addScriptToEvaluateOnNewDocument in iframes
When iframe cancels the initial navigation by document.open,
we did not create isolated worlds and did not evaluate scripts
on new document.
Ideally, we would force a context and evaluate/create worlds
in the initial empty document, because it could be actually
become the real document in multiple circumstances (e.g. window.stop).
Unfortunately, this breaks assumptions in random places
like GuestView (see Patchset 4).
For now, only cover document.open path.
Change-Id: I1651196526c23dec1f8c25dd79926e0ae5ff8887
---
M third_party/blink/web_tests/inspector-protocol/page/add-script-to-evaluate-in-world-expected.txt
M third_party/blink/renderer/core/inspector/inspector_page_agent.cc
M third_party/blink/renderer/core/loader/frame_loader.cc
M third_party/blink/renderer/core/inspector/inspector_page_agent.h
M third_party/blink/renderer/core/probe/core_probes.pidl
M third_party/blink/web_tests/inspector-protocol/page/add-script-to-evaluate-in-world.js
6 files changed, 82 insertions(+), 16 deletions(-)
To view, visit change 3236032. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Andrey Kosyakov.
1 comment:
Patchset:
Andrey, could you please take a look?
To view, visit change 3236032. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Dmitry Gozman.
Patch set 6:Code-Review +1
Attention is currently required from: Dmitry Gozman.
Patch set 6:Commit-Queue +2
Chromium LUCI CQ submitted this change.
CDP: fix Page.addScriptToEvaluateOnNewDocument in iframes
When iframe cancels the initial navigation by document.open,
we did not create isolated worlds and did not evaluate scripts
on new document.
Ideally, we would force a context and evaluate/create worlds
in the initial empty document, because it could be actually
become the real document in multiple circumstances (e.g. window.stop).
Unfortunately, this breaks assumptions in random places
like GuestView (see Patchset 4).
For now, only cover document.open path.
Change-Id: I1651196526c23dec1f8c25dd79926e0ae5ff8887
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3236032
Reviewed-by: Andrey Kosyakov <ca...@chromium.org>
Commit-Queue: Dmitry Gozman <dgo...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#934240}
---
M third_party/blink/web_tests/inspector-protocol/page/add-script-to-evaluate-in-world-expected.txt
M third_party/blink/renderer/core/inspector/inspector_page_agent.cc
M third_party/blink/renderer/core/loader/frame_loader.cc
M third_party/blink/renderer/core/inspector/inspector_page_agent.h
M third_party/blink/renderer/core/probe/core_probes.pidl
M third_party/blink/web_tests/inspector-protocol/page/add-script-to-evaluate-in-world.js
6 files changed, 86 insertions(+), 16 deletions(-)
Wenbin Zhang has created a revert of this change.
To view, visit change 3236032. To unsubscribe, or for help writing mail filters, visit settings.