Commit bc9290f
committed
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 : lando1 parent 4be2734 commit bc9290f
File tree
391 files changed
+38
-826
lines changed- dom
- animation
- audiochannel
- base
- test/gtest
- bindings
- broadcastchannel
- cache
- canvas
- clients/manager
- commandhandler
- console
- events
- fetch
- filesystem
- file
- ipc
- uri
- gamepad
- windows
- geolocation
- html
- indexedDB
- ipc
- jsurl
- localstorage
- media
- eme
- mediadrm
- encoder
- gmp
- gtest
- mediasource
- platforms
- agnostic
- eme
- gmp
- android
- apple
- wmf
- systemservices
- webaudio
- webrtc
- webspeech
- recognition
- synth
- test
- messagechannel
- midi
- network
- notification
- offline
- payments
- performance
- plugins
- base
- ipc
- power
- presentation
- ipc
- provider
- prototype
- quota
- reporting
- script
- security
- test/gtest
- serviceworkers
- smil
- storage
- svg
- system
- u2f
- url
- webbrowserpersist
- websocket
- workers
- worklet
- xhr
- xml
- xslt
- base
- xml
- xpath
- xslt
- xul
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
391 files changed
+38
-826
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | 141 | | |
143 | 142 | | |
144 | 143 | | |
| |||
176 | 175 | | |
177 | 176 | | |
178 | 177 | | |
179 | | - | |
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
| |||
198 | 196 | | |
199 | 197 | | |
200 | 198 | | |
201 | | - | |
202 | 199 | | |
203 | 200 | | |
204 | 201 | | |
| |||
256 | 253 | | |
257 | 254 | | |
258 | 255 | | |
259 | | - | |
260 | 256 | | |
261 | 257 | | |
262 | 258 | | |
| |||
295 | 291 | | |
296 | 292 | | |
297 | 293 | | |
298 | | - | |
299 | 294 | | |
300 | 295 | | |
301 | 296 | | |
302 | 297 | | |
303 | | - | |
304 | 298 | | |
305 | 299 | | |
306 | 300 | | |
| |||
0 commit comments