Closed Bug 872137 Opened 8 years ago Closed 8 years ago

Make history menu use PromptService asynchronously

Categories

(Firefox for Android :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 24

People

(Reporter: jchen, Assigned: blassey)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
Assignee: nobody → blassey.bugs
Attachment #755004 - Flags: review?(wjohnston)
Comment on attachment 755004 [details] [diff] [review]
patch

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

I wanted Prompts.jsm in to make this easier, but this works for me.

::: mobile/android/chrome/content/browser.js
@@ +242,4 @@
>    _tabs: [],
>    _selectedTab: null,
>    _prefObservers: [],
> +  _promptHandlers: [],

Since we're not really using any Array constructs on it, this should just be an object:

_promptHandlers: {},

@@ +1424,5 @@
> +	    let guid = data.guid;
> +	    let handler = this._promptHandlers[guid];
> +	    if (!handler)
> +		break;
> +	    this._promptHandlers[guid] = null;

I'd delete this instead to remove the property from the object entirely:

delete this._promptHandlers[guid];

Also, making a referecne to the handler is kinda weird. Do we need to delete it before we call it?
Attachment #755004 - Flags: review?(wjohnston) → review+
https://hg.mozilla.org/mozilla-central/rev/902d6fe22392
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
Blocks: 877200
Blocks: 877911
No longer blocks: 877911
You need to log in before you can comment on or make changes to this bug.