gecko-dev/dom/audiochannel
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
..
crashtests Bug 1339930 - Don't crash in AudioChannelService when dealing with Windows without a parent; r=baku 2017-02-16 12:35:24 -05:00
AudioChannelAgent.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan 2019-12-06 09:24:56 +00:00
AudioChannelAgent.h Bug 1580659 - part7 : make AudioChannelAgent's 'WindowVolumeChanged()' consistent with other 'WindowXXXChanged()'. r=Ehsan 2019-09-24 06:55:35 +00:00
AudioChannelService.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan 2019-12-06 09:24:56 +00:00
AudioChannelService.h Bug 1578615 - part1 : provide function GetAudibleState() on media element. r=chunmin 2019-09-25 20:07:06 +00:00
moz.build Bug 1544352 - update BUG_COMPONENT for some dom/* and testing/web-platform/* files. r=overholt,jmaher 2019-04-25 09:14:08 +00:00
nsIAudioChannelAgent.idl Bug 1580659 - part6 : remove input config parameter from 'NotifyStartedPlaying()'. r=Ehsan 2019-09-24 21:18:07 +00:00