Closed Bug 771036 Opened 12 years ago Closed 12 years ago

Sanitizer.clearItem("history") not cleaning history

Categories

(Firefox for Android Graveyard :: General, defect)

14 Branch
ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 16

People

(Reporter: public, Assigned: mbrubeck)

Details

Attachments

(1 file)

STR:
With a window as "window", execute:
let san = new window.Sanitizer();
san.clearItem("history");

Tested from within a menu button's handler code (window.NativeWindow.menu.add).

Expected:
History should be cleared.

Actual:
History is not cleared.

As the button-stuff in the preference menu works, I assume it is somewhere between gecko and the native ui causing the issue. The Sanitizers clean history method looks too short for me, as at least in desktop firefox the cleaning is done within the sanitizer, and not only a event broadcasted.
Sanitizer Code (mobile/android/chrome/content/sanitize.js):
try {
  Services.obs.notifyObservers(null, "browser:purge-session-history", "");
} catch (e) { }
// Clear last URL of the Open Web Location dialog
try {
  Services.prefs.clearUserPref("general.open_location.last_url");
} catch (e) { }
History is currently cleared by calling BrowserDB.clearHistory and GeckoApp.handleClearHistory in the Android Java code.  There's no way to clear it from JavaScript code (e.g. for an add-on).  We should fix this.
Assignee: nobody → mbrubeck
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch patchSplinter Review
Attachment #639498 - Flags: review?(mark.finkle)
Attachment #639498 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/d5d75d1a87f5
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 16
Thank you very much for that fast fix :)
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: