Closed Bug 1602083 Opened 4 years ago Closed 4 months ago

Emit executionContextCreated for all contexts that exist when Runtime gets enabled

Categories

(Remote Protocol :: CDP, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: impossibus, Unassigned)

References

Details

(Whiteboard: [puppeteer-beta2-mvp])

https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-enable: "When the reporting gets enabled the event will be sent immediately for each existing execution context." implying that contexts get created regardless of whether Runtime is enabled or not; "enabled" just means notifications are being sent.

So in Runtime.enabled we should iterate over contexts and emit an executionContextCreated event for all the contexts that already exist.

This is especially relevant to methods like Page.createIsolatedWorld and Page.addScriptToEvaluateOnNewDocument, since they create new execution contexts in addition to what Runtime does.

Related to this, I think this also implies that we need to move the turning on/off of the context observer for context-created and context-destroyed out of Runtime. Contexts should be destroyed/created regardless of whether the Runtime domain is instantiated or not.

Priority: P3 → P2
Whiteboard: [lang=js] → [puppeteer-beta-mvp] [lang=js]
Whiteboard: [puppeteer-beta-mvp] [lang=js] → [puppeteer-beta-reserve]
Priority: P2 → P3
Whiteboard: [puppeteer-beta-reserve] → [puppeteer-beta-reserve][lang=js]

This is blocked by bug 1623482 and cannot be mentored at the moment.

Mentor: mjzffr
Whiteboard: [puppeteer-beta-reserve][lang=js] → [puppeteer-beta-reserve]

This seems to be important for clients.

Priority: P3 → P2
Whiteboard: [puppeteer-beta-reserve] → [puppeteer-beta2-mvp]
Component: CDP: Runtime → CDP
Severity: normal → S3

We are not going to implement this. One should use WebDriver BiDi these days.

Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.