Closed
Bug 830983
Opened 11 years ago
Closed 11 years ago
Remember my decision for desktop notification API in browser, clear storage data, access API again - API does not work
Categories
(Core :: Permission Manager, defect)
Tracking
()
People
(Reporter: jsmith, Assigned: mounir)
References
Details
(Keywords: dataloss)
Attachments
(2 files, 1 obsolete file)
149.27 KB,
text/plain
|
Details | |
16.09 KB,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
Build: B2G 18 1/15/2013 Device: Unagi Steps: 1. Go to http://jds2501.github.com/webapi-permissions-tests/webapi_permissions_test.html 2. Select the desktop notification API test and remember my choice 3. Go to browser settings and clear your storage data 4. Restart the browser 5. Repeat step #1 and step #2 Expected: A desktop notification should appear. Actual: Nothing happens. Additional Notes: I'm generally noticing "weird" behavior happening when you clear your storage data and try to reuse an existing site/WebAPI. What's really bad here is that clearing your storage data is supposed help you start with a clean state, but in this case, you are stuck unless you factory reset the phone.
Reporter | ||
Updated•11 years ago
|
blocking-b2g: --- → tef?
Reporter | ||
Comment 1•11 years ago
|
||
So there's some "strange" behavior happening as a result of clearing storage data. Mounir - Any ideas on why there's some weird behavior going on here?
Flags: needinfo?(mounir)
Reporter | ||
Comment 2•11 years ago
|
||
Reporter | ||
Comment 3•11 years ago
|
||
Looks like there may be more than one bug here. I'm seeing really not so nice things in the logcat after trying to use the browser after clearing storage data. 01-15 13:52:33.349: E/GeckoConsole(587): [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [inIDOMUtils.setContentState]" {file: "chrome://global/content/BrowserElementChild.js" line: 1254}] 01-15 13:52:52.619: E/GeckoConsole(109): [JavaScript Error: "NO SETTINGS PERMISSION FOR: app://browser.gaiamobile.org 01-15 13:53:18.779: E/GeckoConsole(109): [JavaScript Error: "TypeError: this.currentTab.dom.reload is not a function" {file: "app://browser.gaiamobile.org/js/browser.js" line: 597}]
Comment 4•11 years ago
|
||
Those logcat messages hint that the browser app has lost all of its permissions including settings and access to the Browser API. Clearing private data in the browser should clear permissions for browser content, but not the browser app itself.
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(mounir)
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Ben, I'm facing same kind of issues in bug 829397, could you give a try to this platform patch and see if it fix your issue without breaking permission cleaning?
Comment 7•11 years ago
|
||
FWIW that patch looks right to me, but we should get Mounir to look at it.
Updated•11 years ago
|
Attachment #702787 -
Flags: review?(mounir)
Updated•11 years ago
|
Assignee: nobody → poirot.alex
Comment on attachment 702787 [details] [diff] [review] Bug 830983: Prevent removing in-memory app permissions when deleting only its in-browser permissions. Review of attachment 702787 [details] [diff] [review]: ----------------------------------------------------------------- Trivial fix. I'll mark this one since Mounir is traveling.
Attachment #702787 -
Flags: review?(mounir) → review+
Updated•11 years ago
|
Keywords: checkin-needed
Comment 10•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/aa20a6097d0b
Keywords: checkin-needed
Comment 11•11 years ago
|
||
Backed out. OTH test failed: https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=aa20a6097d0b https://hg.mozilla.org/integration/mozilla-inbound/rev/3702b7ead05e
Updated•11 years ago
|
Blocks: b2g-permissions
Assignee | ||
Comment 12•11 years ago
|
||
Isn't that a regression from bug 827050 where we are removing stuff from the DB but not from the memory representation of the PermissionManager? The patch was clearly wrong (if aBrowserOnly=false, we remove no permissions...) and was a hack anyway because we should have change GetPermissionsForApp (the enumerator). Taking this.
Assignee | ||
Updated•11 years ago
|
Component: General → Permission Manager
Product: Boot2Gecko → Core
Comment 13•11 years ago
|
||
Hmm I would have put the data.permissions[i]->GetHost(host); and data.permissions[i]->GetType(type); after the continue to avoid getting data we're not going to use. But other than that the patch looked correct. If aBrowserOnly=false then all permissions will be removed (which is the uninstall app use) otherwise only the ones that have isInBrowserElement=true will be removed (which are the same that are being deleted from the database). Are you sure this isn't a test failure (as in the test not being correct, not the function being incorrect)?
Assignee | ||
Comment 14•11 years ago
|
||
Attachment #702787 -
Attachment is obsolete: true
Attachment #704124 -
Flags: review?(jonas)
Attachment #704124 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 15•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4886df89ef45 https://hg.mozilla.org/releases/mozilla-b2g18/rev/28756e5bb960
Flags: in-testsuite+
Target Milestone: --- → mozilla21
Reporter | ||
Comment 16•11 years ago
|
||
Resolved fixed per jst rules - inbound + b2g18.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
status-b2g18:
--- → fixed
status-firefox19:
--- → wontfix
status-firefox20:
--- → wontfix
status-firefox21:
--- → fixed
Reporter | ||
Comment 18•11 years ago
|
||
Verified on 1/20 build.
Status: RESOLVED → VERIFIED
Keywords: verifyme
Comment 19•11 years ago
|
||
Landed on mozilla-b2g18/gaia master prior to the 1/25 branching to mozilla-b2g18_v1_0_0/v1.0.0, updating status-b2g-v1.0.0 to fixed.
status-b2g18-v1.0.0:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•