Closed Bug 1144355 Opened 9 years ago Closed 9 years ago

"doc.documentElement is undefined" in reader task

Categories

(Toolkit :: Reader Mode, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: Margaret)

References

(Blocks 1 open bug)

Details

(Keywords: testcase)

Attachments

(2 files)

103 bytes, text/html
Details
PR
46 bytes, text/x-github-pull-request
Gijs
: review+
Details | Review
Attached file testcase (blank DOM)
*************************
A coding exception was thrown and uncaught in a Task.

Full message: TypeError: doc.documentElement is undefined
Full stack: Readability.prototype._grabArticle@resource://gre/modules/reader/Readability.js:418:5
Readability.prototype.parse@resource://gre/modules/reader/Readability.js:1507:26
Agent.parseDocument@resource://gre/modules/reader/ReaderWorker.js:48:12
worker.dispatch@resource://gre/modules/reader/ReaderWorker.js:21:24
anonymous/AbstractWorker.prototype.handleMessage@resource://gre/modules/workers/PromiseWorker.js:122:16
@resource://gre/modules/reader/ReaderWorker.js:35:41

*************************
https://dxr.mozilla.org/mozilla-central/source/toolkit/components/reader/Readability.js#411

>  // Check if any "dir" is set on the toplevel document element
>  this._articleDir = doc.documentElement.getAttribute("dir");
Assignee: nobody → margaret.leibovic
Attached file PR
Attachment #8579062 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8579062 [details] [review]
PR

Nice! (merged)
Attachment #8579062 - Flags: review?(gijskruitbosch+bugs) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.