• Andrey Kosyakov's avatar
    DevTools: add support for injecting bindings by context name · abacd4c1
    Andrey Kosyakov authored
    This adds support for injecting binding into contexts other than
    main based on the context name (AKA isolated world name in Blink
    terms). This would simplify a common use case for addBinding in
    Puppeteer and other automation tools that use addBinding to expose
    a back-channel for extension code running in an isolated world by
    making bindings available to such code at an early stage and in a
    race-free manner (currently, we can only inject a binding into
    specific context after the creation of the context has been reported
    to the client, which typically introduces a race with other evals
    the client may be running in the context).
    
    Change-Id: I66454954491a47a0c9aa4864f0aace4da2e67d3a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2440984Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
    Reviewed-by: 's avatarPavel Feldman <pfeldman@chromium.org>
    Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70266}
    abacd4c1
add-binding-expected.txt 4.27 KB