New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 846099 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2018
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Immediately running callFunctionOn in a worker returns 'Execution context was destroyed.'

Project Member Reported by einbinder@chromium.org, May 23 2018

Issue description

After adding workers to Puppeteer, I've been occasionally getting an `Execution context was destroyed.` error when running Runtime.callFunctoinOn with awaitPromise:true in the execution context immediately after getting an Runtime.executionContextCreated event.

No executionContextDestroyed event is sent, and a subsequent call to Runtime.callFunctionOn in the same execution context works fine. So it's not actually being destroyed.

It appears that the InjectedScript is being unloaded before my promise is resolved.
 
Reproduction is available downstream: https://github.com/GoogleChrome/puppeteer/issues/2632
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/0b3e8e184c2a9f367812ba4265098325cfe29940

commit 0b3e8e184c2a9f367812ba4265098325cfe29940
Author: Alexey Kozyatinskiy <kozyatinskiy@chromium.org>
Date: Tue Jun 05 18:04:44 2018

[inspector] postpone API interrupts during creation of injected script

DevTools may process another protocol message during API interrupt this
API may lead to createInjectedScript reentrance and will fail.
Let's postpone interrupts.

Bug:  chromium:846099 
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ia06e034a6287087e4674559d8911d2f4a0b1b459
Reviewed-on: https://chromium-review.googlesource.com/1086372
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53531}
[modify] https://crrev.com/0b3e8e184c2a9f367812ba4265098325cfe29940/src/api.cc
[modify] https://crrev.com/0b3e8e184c2a9f367812ba4265098325cfe29940/src/debug/debug-interface.h
[modify] https://crrev.com/0b3e8e184c2a9f367812ba4265098325cfe29940/src/inspector/injected-script.cc
[modify] https://crrev.com/0b3e8e184c2a9f367812ba4265098325cfe29940/src/inspector/inspected-context.cc
[modify] https://crrev.com/0b3e8e184c2a9f367812ba4265098325cfe29940/test/cctest/BUILD.gn
[add] https://crrev.com/0b3e8e184c2a9f367812ba4265098325cfe29940/test/cctest/test-inspector.cc
[modify] https://crrev.com/0b3e8e184c2a9f367812ba4265098325cfe29940/tools/gcmole/BUILD.gn

Comment 3 by kozy@chromium.org, Jun 5 2018

Status: Fixed (was: Assigned)

Sign in to add a comment