Closed Bug 880913 Opened 10 years ago Closed 7 years ago

JavaScript Warnings from Readability.js and JSDOMParser.js when loading many web pages


(Toolkit :: Reader Mode, defect)

Not set



Tracking Status
firefox23 --- unaffected
firefox24 --- affected


(Reporter: cpeterson, Unassigned)



(Keywords: regression)

After updating my mozilla-central tree today, I see the following JS warnings when loading many web pages. Some examples: "" logs these warnings, but "" does not!

E/GeckoConsole(28737): [JavaScript Warning: "test for equality (==) mistyped as assignment (=)?" {file: "chrome://browser/content/JSDOMParser.js" line: 782 column: 36 source: "      while (child = this.readNode()) {
E/GeckoConsole(28737): "}]
E/GeckoConsole(28737): [JavaScript Warning: "in strict mode code, functions may be declared only at top level or immediately within another function" {file: "chrome://browser/content/Readability.js" line: 436 column: 15 source: "      function purgeNode(node) {
E/GeckoConsole(28737): "}]
E/GeckoConsole(28737): [JavaScript Warning: "reference to undefined property this.html[this]" {file: "chrome://browser/content/JSDOMParser.js" line: 642}]
E/GeckoConsole(29562): [JavaScript Warning: "reference to undefined property next.tagName" {file: "chrome://browser/content/Readability.js" line: 262}]
E/GeckoConsole(29562): [JavaScript Warning: "reference to undefined property next.tagName" {file: "chrome://browser/content/Readability.js" line: 346}]
E/GeckoConsole(28737): [JavaScript Warning: "reference to undefined property siblingNode.className" {file: "chrome://browser/content/Readability.js" line: 617}]

This code has not changed recently, but I did not see these JS warnings yesterday so code change on 6/6 or 6/7 must have indirectly triggered these warnings.
I spun off bug 958734 for the "test for equality" one, and bug 958735 for the "functions may only be declared" one. I'm marking this bug as depending on those.

(I don't know if the other warnings here; I just happened to independently notice those first two today, and I think it's easier to track/fix them in separate bugs rather than all together.)
Depends on: 958735, 958734
Product: Firefox for Android → Toolkit
Version: Firefox 23 → unspecified
If this still happens a lot we should file bugs with more detailed STR. Right now, I don't think it's worth investigating this further because the code has changed a lot since this got filed, and strict warnings aren't fatal.
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.