• Lukasz Anforowicz's avatar
    Skip more scenarios via blocklist, rather than unconditionally. · db175858
    Lukasz Anforowicz authored
    Similarly to r778581, after this CL, the rewriter will no longer
    unconditionally skip fields in the following scenarios:
    - Field pointing to a struct/class with deleted operator new
    - Fields in generated code
    
    Instead, the rewriter will emit such fields as candidates for the
    --field-filter-file blocklist - in the following section of the output:
    
        ==== BEGIN FIELD FILTERS ====
        GeneratedStruct::ptr_field  # generated-code
        MyStruct::ptr_to_stack  # pointee-has-no-operator-new
        NoNewOperator::field  # embedder-has-no-operator-new
        ==== END FIELD FILTERS ====
    
    Skipping via filter list is desirable, because it helps with auditing
    and counting the filtered fields.  In particular:
    - operator-new-based cases should be vetted to ensure the heuristic
      is sound and check what kind of cases are present outside of Blink
    - generated code should eventually be fixed (to use CheckedPtr as
      appropriate) after the rewrite and explicit auditing will help scope
      this work
    
    Note that the "embedder-has-no-operator-new" case was not present (i.e.
    was not unconditionally skipped) before this CL - this case is new.
    
    Bug: 1069567
    Change-Id: Ic67ac7a94225d0e11e1e405e75dc41a7248ab67f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2488744Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#819402}
    db175858
gen-generated-code-expected.txt 663 Bytes