• dcheng's avatar
    Fix receiver checks for v8::Function on a remote context receiver. · 96eda1f7
    dcheng authored
    v8 allows the embedder to specify a global template to use when
    creating a new context. However, v8 does not use the supplied
    template directly when creating the global proxy: it creates a
    unique template for each global proxy. However, this is problematic
    for remote contexts: functions cannot use strict receiver checks
    with the remote context, as the global template will never match
    the global proxy.
    
    To fix this, remote contexts now also include a remote global
    object in the prototype chain that is instantiated with the global
    template. This mirrors the way the global proxy is configured for a
    full v8 context, and allows strict receiver checks to work.
    
    BUG=527190
    
    Review-Url: https://codereview.chromium.org/2677653002
    Cr-Commit-Position: refs/heads/master@{#43361}
    96eda1f7
test-access-checks.cc 16.6 KB