Unreachable code after return in browser_documentnavigation.js

RESOLVED FIXED in Firefox 44

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: MattN, Assigned: enndeakin)

Tracking

(Depends on: 1 bug)

unspecified
mozilla44
Points:
1
Dependency tree / graph

Firefox Tracking Flags

(firefox44 fixed)

Details

(URL)

Attachments

(1 attachment)

There is dead code after a return at http://hg.mozilla.org/mozilla-central/annotate/6457f01e4bcb/browser/base/content/test/general/browser_documentnavigation.js#l108 which causes a warning.

108   return ContentTask.spawn(gBrowser.selectedBrowser, { }, function* () {
109     return content.document.getElementById("button1").focus();
110   });
111 
112   yield* expectFocusOnF6(false, "main-window", gURLBar.inputField,
113                                 false, "basic focus content page with button focused urlbar");
…
Flags: needinfo?(enndeakin)
(Assignee)

Comment 1

3 years ago
Created attachment 8667035 [details] [diff] [review]
browser_documentnavigation_fix

Turns out this was masking an actual bug, that can be reproduced as follows:

1. Load a page and tab to it such that the document is focused (focus ring on document)
2. Click the urlbar to focus it
3. Press Shift+F6

Actual: Nothing appears to happen.
Expected: The document is focused again.
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Flags: needinfo?(enndeakin)
Attachment #8667035 - Flags: review?(bugs)
(Assignee)

Updated

3 years ago
Points: --- → 1

Updated

3 years ago
Attachment #8667035 - Flags: review?(bugs) → review+
(Assignee)

Comment 2

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/8305fc7ffd1c2adc305f9047276dd2c1aed3c1c5
Bug 1208789, clear starting node before traversing backwards by document, r=smaug
https://hg.mozilla.org/mozilla-central/rev/8305fc7ffd1c
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.