Closed Bug 1120389 Opened 10 years ago Closed 10 years ago

"search.xml, line 500: TypeError: aEvent is undefined" when using the 'Paste & Search' context menu item

Categories

(Firefox :: Search, defect)

defect
Not set
normal
Points:
1

Tracking

()

RESOLVED FIXED
Firefox 38
Iteration:
38.1 - 26 Jan
Tracking Status
firefox36 --- unaffected
firefox37 --- fixed
firefox38 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

(Keywords: regression)

Attachments

(1 file)

Attached patch FixSplinter Review
Line 500 in the preprocessed file is http://hg.mozilla.org/mozilla-central/annotate/bb8d6034f5f2/browser/components/search/content/search.xml#l508

This is from bug 1102937.

Blake, the case where we don't have an event object is when the user clicked the "Paste & Search" context menu item: http://hg.mozilla.org/mozilla-central/annotate/bb8d6034f5f2/browser/components/search/content/search.xml#l819
Are we happy with this being recorded as "unknown" for telemetry?
Attachment #8547516 - Flags: review?(felipc)
Flags: needinfo?(bwinton)
Could we pass in a special event object to record it as a "paste" search?  (It looks like we could change http://hg.mozilla.org/mozilla-central/annotate/bb8d6034f5f2/browser/components/search/content/search.xml#l819 to say "BrowserSearch.searchBar.handleSearchCommand({type:'paste'})", and then check for that in http://hg.mozilla.org/mozilla-central/annotate/bb8d6034f5f2/browser/components/search/content/search.xml#l476 without _too_ many code changes…)
Flags: needinfo?(bwinton)
(In reply to Blake Winton (:bwinton) from comment #1)
> Could we pass in a special event object to record it as a "paste" search?

We could, but I'm not sure it's easier than passing the real command event, and detecting that it was on a menuitem with the paste-and-search anonid.

Would you like to do this as a separate bug, or takeover this bug and do it here?
Flags: needinfo?(bwinton)
I'm kind of swamped.  Could I ask you to pass the real command event, and detect it was on the paste-and-search menu item?
Flags: needinfo?(bwinton)
(In reply to Blake Winton (:bwinton) from comment #3)
> I'm kind of swamped.  Could I ask you to pass the real command event, and
> detect it was on the paste-and-search menu item?

I guess I'll file another bug then (and probably mark it as mentored), as it's not directly related; just the way to reproduce this bug. We still need to support the aEvent parameter being undefined, as add-ons could be using it.
Blocks: 1120957
Attachment #8547516 - Flags: review?(felipc) → review+
https://hg.mozilla.org/integration/fx-team/rev/dceee642eec7
Assignee: nobody → florian
Whiteboard: [fixed-in-fx-team]
Points: --- → 1
Flags: qe-verify-
Flags: firefox-backlog+
Keywords: regression
Status: NEW → ASSIGNED
Iteration: --- → 38.1 - 26 Jan
https://hg.mozilla.org/mozilla-central/rev/dceee642eec7
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 38
Comment on attachment 8547516 [details] [diff] [review]
Fix

Approval Request Comment
[Feature/regressing bug #]: bug 1102937
[User impact if declined]: JS error in the console, telemetry not working in an edge case. No feature visibly broken.
[Describe test coverage new/current, TBPL]: none
[Risks and why]: very low, just moving a line of code closer to where it's actually used.
[String/UUID change made/needed]: none.
Attachment #8547516 - Flags: approval-mozilla-aurora?
Comment on attachment 8547516 [details] [diff] [review]
Fix

Aurora+
Attachment #8547516 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: