Closed Bug 2067179 Opened 1 month ago Closed 25 days ago

Remove unused AboutReaderParent._getArticle

Categories

(Toolkit :: Reader Mode, task, P1)

task

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: mkaply, Assigned: jieke, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: [lang=js])

Attachments

(1 file)

Filing as a good first bug to learn workflows.

AboutReaderParent._getArticle() has no callers anywhere in the tree, including tests. Reader Mode downloads articles from the child side (AboutReader._loadArticle calls ReaderMode.downloadAndParseDocument directly), so this parent-side wrapper is dead code. Please remove the method along with its JSDoc comment (lines 261-278).

Link to the code:
https://searchfox.org/firefox-main/rev/64e3d949f357db531c6deb0444ace3ba134d73e0/browser/actors/AboutReaderParent.sys.mjs#261-278

Note that the lazy ReaderMode module getter at the top of the file is still needed: it is used by leaveReaderMode(). Only the method goes away.

To verify the fix:

Confirm the definition was the only reference (prints one line before your patch, nothing after):
rg -n '_getArticle(' browser/ toolkit/

Then run the Reader Mode tests and the linters:
./mach test toolkit/components/reader/tests/browser
./mach lint --outgoing

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

Assignee: nobody → jieke
Status: NEW → ASSIGNED
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c1549b739a72 https://hg.mozilla.org/integration/autoland/rev/dccd5616f27e Remove unused AboutReaderParent._getArticle. r=firefox-desktop-core-reviewers ,dao
Severity: -- → N/A
Priority: -- → P1
Status: ASSIGNED → RESOLVED
Closed: 25 days ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
QA Whiteboard: [qa-triage-done-c158/b157]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: