• Hitoshi Yoshida's avatar
    CodeGen: Introduce fooNonNull and hasFooNonNull for dictionary members · ade0a3fa
    Hitoshi Yoshida authored
    This CL introduces following methods for dictionary members whose type
    is nullabe.  These methods are migration adapters, and will be removed
    after IDL compiler migraiton.
    
    - fooNonNull(): Returns a non-null type value for a member |foo|.
      It crashes if foo() is missing or has a null value.
    - hasFooNonNull(): Returns true iff |foo| has a non-null value.
    
    In practice, however, they are aliases of foo() and hasFoo() in the
    running IDL compiler.  We are changing behaviors of foo() and hasFoo()
    precisely in the new compiler, and expect these new methods work as
    migration adapters.
    
    
    Bug: 839389
    Change-Id: If19479779ea3d19b498e23a5001aabd38366a2ac
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2215648
    Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
    Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#772269}
    ade0a3fa
v8_dictionary.py 13.5 KB