Closed Bug 853508 Opened 11 years ago Closed 11 years ago

Lazy load SelectionHandler

Categories

(Firefox for Android Graveyard :: Text Selection, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 22

People

(Reporter: Margaret, Assigned: Margaret)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
In SelectionHandler.observe(), we ignore notifications if text selection isn't active, so we don't actually need to be registering observers in BrowserApp.startup() like the rest of the world.

Because of this, we can just move SelectionHandler into a lazily-loaded script.

The only change I made to SelectionHandler is getting rid of init/uninit and replacing them with _addObservers/_removeObservers.

I want to do some more cleanup in here, but this is a start :)
Attachment #727748 - Flags: review?(bnicholson)
Comment on attachment 727748 [details] [diff] [review]
patch

Nice, looks good.
Attachment #727748 - Flags: review?(bnicholson) → review+
Gah, bnicholson pointed out that I did a bad job un-bitrotting this:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c06a5b6a9f9f
https://hg.mozilla.org/mozilla-central/rev/074bf9222e0a
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: