• Marina Sakai's avatar
    Create a new API in V8PrivateProperty to get Symbol · 1300b269
    Marina Sakai authored
    To access private properties of a V8 object, we need a v8::Private as a key for each property.  V8PrivateProperty provides its wrapper class "Symbol" as a shorthand API.
    
    Currently, V8PrivateProperty has two types of APIs to get Symbol.  One is a macro-generated function, which needs to be managed by hand.  And the other is string-based mapping, which defers the management of the mapping to V8.
    
    This CL adds a new API to get a Symbol (wired with a unique v8::Private) from a key pointer.  All the current Symbol getters will be replaced with this new API.
    Also uses it to access private properties to keep-alive objects.
    
    Bug: 715418, 1005601
    Change-Id: I29735fdf5b8748c6dc7f57f91f8c5ebd5e5991b5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810511
    Commit-Queue: Marina Sakai <marinasakai@google.com>
    Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#698417}
    1300b269
attributes.cc.tmpl 28.3 KB