Closed
Bug 1461248
Opened 7 years ago
Closed 7 years ago
Only load ContextMenu.jsm when a contextmenu event occurs
Categories
(Firefox :: Menus, enhancement, P1)
Firefox
Menus
Tracking
()
RESOLVED
FIXED
Firefox 62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: Felipe, Assigned: Felipe)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxperf:p1])
Attachments
(1 file)
An instance of the ContextMenu object is created for every tab (in content.js) only to add its event listener for the "contextmenu" event.
We can add this observer in content.js and only load the .jsm when that happens.
This patch uses the helper being added in bug 1457988
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8975391 [details]
Bug 1461248 - Only load ContextMenu.jsm when a contextmenu event occurs.
https://reviewboard.mozilla.org/r/243698/#review249640
defineLazyProxy looks awesome! Thanks, felipe!
Attachment #8975391 -
Flags: review?(mconley) → review+
Updated•7 years ago
|
Priority: -- → P1
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
I did some small shuffling around in content.js to make the code look cleaner: moved the `var global = this` to the top of the file, to group the XPCOMUtils stuff together. I'll carry the r+ forward since there's no functionality change.
I also removed the `var contextMenu = ` which was useless, but now I need to wait for bug 1462400 before landing this, otherwise eslint will complain
Pushed by felipc@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/43757e7a227f
Only load ContextMenu.jsm when a contextmenu event occurs. r=mconley
Comment 6•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Assignee | ||
Updated•7 years ago
|
Blocks: memshrink-content
You need to log in
before you can comment on or make changes to this bug.
Description
•