• Michael Lippautz's avatar
    Reland "[bindings] Replace JSFunction backlink with GC-aware wrapper link" · b525aaf6
    Michael Lippautz authored
    Replaces the custom backlink from V8->Blink that was using a v8::External with a
    GC-aware backpointer that is encapsulated in the CustomWrappableAdapter
    interface.
    
    CustomWrappableAdapter establishes a link from a given JavaScript object to the
    Blink object inheriting from CustomWrappableAdapter. The link is known to
    garbage collectors and thus the Blink object will be kept alive as long as the
    JavaScript object is alive. The adapter can be used to model liveness across V8
    and Blink component boundaries. In contrast to ScriptWrappable, there is no IDL
    definitions required and the JavaScript object must not escape to user-visible
    JavaScript.
    
    This reverts commit c1d0a59d.
    
    Bug: chromium:843903
    Change-Id: I8763cdf56ff3cbeff5fa7ae508bc1be8a5deb1c3
    Reviewed-on: https://chromium-review.googlesource.com/1154926Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#579039}
    b525aaf6
BUILD.gn 75 KB