Get TabQueueDispatcher to use SafeIntent

RESOLVED FIXED

Status

()

Firefox for Android
General
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mhaigh, Assigned: mhaigh)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Currently TabQueueDispatcher doesn't use a safe intent, this needs to change!
(Assignee)

Comment 1

3 years ago
Created attachment 8590383 [details] [diff] [review]
Get TabQueueDispatcher to use SafeIntent

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
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.