Remove overridden/duplicated [$getChildren] methods - #21736
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #21736 +/- ##
==========================================
- Coverage 90.09% 90.08% -0.02%
==========================================
Files 264 264
Lines 67194 67231 +37
==========================================
+ Hits 60538 60563 +25
- Misses 6656 6668 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/botio browsertest |
From: Bot.io (Linux m4)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/a776a2c5704fad5/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/5c7efcb12ba07b5/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/a776a2c5704fad5/output.txt Total script time: 16.51 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/5c7efcb12ba07b5/output.txt Total script time: 23.48 mins
|
Note how the `XFAObject` class has *two separate* `[$getChildren]` methods, which means that the later one will override the former. Looking at [the coverage data](https://app.codecov.io/gh/mozilla/pdf.js/commit/022e9588728346cde58088a9925120293af1c8f4/blob/src/core/xfa/xfa_object.js?dropdown=coverage#L330) confirms that the former method is indeed unused. Note that normally ESLint will catch that sort of thing, but I guess that the name being determined from a `Symbol` prevents that (since ESLint is only a static code analyser). Furthermore the `XmlObject` class extends `XFAObject`, however it still defines its own `[$getChildren]` method that is *identical* to the one in the base class.
a4b3733 to
a611b78
Compare
|
Rebasing to |
Note how the
XFAObjectclass has two separate[$getChildren]methods, which means that the later one will override the former. Looking at the coverage data confirms that the former method is indeed unused.Note that normally ESLint will catch that sort of thing, but I guess that the name being determined from a
Symbolprevents that (since ESLint is only a static code analyser).Furthermore the
XmlObjectclass extendsXFAObject, however it still defines its own[$getChildren]method that is identical to the one in the base class.