updateReaderButton: tab-content.js, line 337: TypeError: content is null

RESOLVED FIXED in Firefox 46

Status

Firefox Graveyard
Reading List
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Jesse Ruderman, Assigned: jaws)

Tracking

(Blocks: 1 bug, {testcase})

Trunk
Firefox 46
testcase

Details

Attachments

(2 attachments)

(Reporter)

Description

2 years ago
Created attachment 8695197 [details]
testcase (fragile timing)

JavaScript error: chrome://browser/content/tab-content.js, line 337: TypeError: content is null

In bug 1186346, a null check for |content| was added to |get isAboutReader|. Should |updateReaderButton| be fixed in the same way?

>  /**
>   * NB: this function will update the state of the reader button asynchronously
>   * after the next mozAfterPaint call (assuming reader mode is enabled and
>   * this is a suitable document). Calling it on things which won't be
>   * painted is not going to work.
>   */
>  updateReaderButton: function(forceNonArticle) {
>    if (!ReaderMode.isEnabledForParseOnLoad || this.isAboutReader ||
>        !(content.document instanceof content.HTMLDocument) ||
>        content.document.mozSyntheticDocument) {
>      return;
>    }
>
>    this.scheduleReadabilityCheckPostPaint(forceNonArticle);
>  },
Flags: needinfo?(jaws)
Created attachment 8698100 [details] [diff] [review]
Patch

Apologies for the poor commit message, couldn't think of anything more descriptive.
Assignee: nobody → jaws
Status: NEW → ASSIGNED
Flags: needinfo?(jaws)
Attachment #8698100 - Flags: review?(gijskruitbosch+bugs)

Updated

2 years ago
Attachment #8698100 - Flags: review?(gijskruitbosch+bugs) → review+
Keywords: checkin-needed

Comment 2

2 years ago
https://hg.mozilla.org/integration/fx-team/rev/5ce3cd508888
Keywords: checkin-needed

Comment 3

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/5ce3cd508888
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox46: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.