• Devlin Cronin's avatar
    [Extensions Bindings] Update feature initialization · 377a7a96
    Devlin Cronin authored
    Make two changes to how we initialize features for contexts in extension
    native bindings:
    - Treat runtime specially. This is necessary because certain runtime
      methods should be exposed only if there exists an extension that can
      connect to the given context (e.g., an extension that cooperates with
      a given website).  Simply checking the fature availability is
      insufficient. Update unittests to match.
    - Treat web contexts specially.  Web contexts only ever have a handful
      (3) APIs that are potentially available to them, and are by far the
      most commonly created context. As such, add a fast path for them by
      only checking those possible features. (This matches logic in the
      JS bindings system).
    
    Bug: 653596
    Change-Id: I57f50b6f762f578679771c5e07a1b3ce31da3e0c
    Reviewed-on: https://chromium-review.googlesource.com/571962Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
    Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#486965}
    377a7a96
BUILD.gn 13.7 KB