Closed Bug 1152873 Opened 9 years ago Closed 9 years ago

Get TabQueueDispatcher to use SafeIntent

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mhaigh, Assigned: mhaigh)

References

Details

Attachments

(1 file)

Currently TabQueueDispatcher doesn't use a safe intent, this needs to change!
this seems to be the only place in the tab queue work where we aren't using a SafeIntent when accessing Intent data.
Attachment #8590383 - Flags: review?(rnewman)
Comment on attachment 8590383 [details] [diff] [review]
Get TabQueueDispatcher to use SafeIntent

Review of attachment 8590383 [details] [diff] [review]:
-----------------------------------------------------------------

No need for this if you're only going to immediately unwrap. SafeIntent just lets you safely access the intent, and you're not doing that here.

Look for uses like .getStringExtra; those are the places that you need it. Like here:

        // The URL is usually hiding somewhere in the extra text. Extract it.
        final String dataString = intent.getDataString();

You might need to extend SafeIntent to add getDataString. And you might prefer to use the static variants rather than creating and then unwrapping everywhere. Something like:

        final String dataString = SafeIntent.getDataString(intent);    // Might be null.
Attachment #8590383 - Flags: review?(rnewman) → review-
Comment on attachment 8590383 [details] [diff] [review]
Get TabQueueDispatcher to use SafeIntent

Ah, I already did! Carry on :)
Attachment #8590383 - Flags: review- → review+
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/ad2b638ad358
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
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: