Closed Bug 774628 Opened 12 years ago Closed 11 years ago

mozApps.getSelf should emits an NOT_INSTALLED DOMError if the app isn't installed

Categories

(Core Graveyard :: DOM: Apps, defect)

16 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: sonny, Unassigned)

Details

Attachments

(1 file)

Open scratchpad, paste: var request = window.navigator.mozApps.getSelf(); request.onsuccess = function() { // Pull the name of the app out of the App object alert("Name of app: " + request.result.manifest.name); }; request.onerror = function() { // Display error name from the DOMError object alert("Error: " + request.error.name); }; Nothing happens.
Indeed. Sonny, can you send back Webapps:GetSelf:Return:KO and return early if |tmp.length == 0| at https://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#523 ? Then you'll get an ERROR from https://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.js#107
Assignee: ianb → nobody
Component: HTML → DOM: Mozilla Extensions
OS: Mac OS X → All
Product: Web Apps → Core
Hardware: x86 → All
Version: unspecified → 16 Branch
This sounds very similar to bug 755769. Same root cause (i.e. a dup)?
Blocks: 746465
No longer blocks: 746465
Component: DOM: Mozilla Extensions → DOM: Apps
Assignee: nobody → sonny.piers
Attached patch 1.0Splinter Review
Attachment #655937 - Flags: review?(fabrice)
Attachment #655937 - Flags: review?(fabrice) → review+
Can someone take a look at this so it can be landed ASAP?
(In reply to Sonny Piers [:sonny] from comment #4) > Can someone take a look at this so it can be landed ASAP? When you want a patch to be landed, add checkin-needed in the keywords field.
Keywords: checkin-needed
Okay thanks.
This is causing OSX debug timeouts and leaks on Try. https://tbpl.mozilla.org/?tree=Try&rev=c012043c704d https://tbpl.mozilla.org/php/getParsedLog.php?id=15172697&tree=Try 8560 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | Test timed out. Bug 754223 - Intermittent test_install_app.xul | #Super Crazy Basic App# is expected to be true per template #== "Wild and Crazy Basic App"# Assertion failure: appId != nsIScriptSecurityManager::NO_APP_ID, at ../../../extensions/cookie/nsPermissionManager.cpp:144 TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_errors.xul | Exited with code 1 during test run PROCESS-CRASH | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_errors.xul | application crashed (minidump found) Thread 0 (crashed) TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | missing output line for total leaks! Bug 782633 - Intermittent TEST-UNEXPECTED-FAIL | tab process nnn | automationutils.processLeakLog() | missing output line for total leaks! TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | leaked 19152 bytes during test execution TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | leaked 1 instance of AsyncFetchAndSetIconFromNetwork with size 248 bytes TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | leaked 1 instance of CalculateFrecencyFunction with size 24 bytes TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | leaked 1 instance of Connection with size 192 bytes TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | leaked 1 instance of Database with size 232 bytes TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | leaked 1 instance of FixupURLFunction with size 24 bytes Please do not re-request checkin until this has a green Try run.
Keywords: checkin-needed
Looks like the failure is on all platforms.
The leak isn't yours. That's from another patch in the Try push.
update?
(In reply to Sonny Piers [:sonny] from comment #10) > update? You need to fix your patch, submit it to try, and make sure try is green. Then, re-request review.
Fix what? see comment 9(In reply to Jason Smith [:jsmith] from comment #11) > (In reply to Sonny Piers [:sonny] from comment #10) > > update? > > You need to fix your patch, submit it to try, and make sure try is green. > Then, re-request review. Fix what? The leak wasn't mine see comment 9
The failures above the leak were... (In reply to Ryan VanderMeulen from comment #7) > This is causing OSX debug timeouts and leaks on Try. > https://tbpl.mozilla.org/?tree=Try&rev=c012043c704d > > https://tbpl.mozilla.org/php/getParsedLog.php?id=15172697&tree=Try > > 8560 ERROR TEST-UNEXPECTED-FAIL | > chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/ > test_install_app.xul | Test timed out. > Bug 754223 - Intermittent test_install_app.xul | #Super Crazy Basic App# is > expected to be true per template #== "Wild and Crazy Basic App"# Assertion > failure: appId != nsIScriptSecurityManager::NO_APP_ID, at > ../../../extensions/cookie/nsPermissionManager.cpp:144 > TEST-UNEXPECTED-FAIL | > chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/ > test_install_errors.xul | Exited with code 1 during test run > PROCESS-CRASH | > chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/ > test_install_errors.xul | application crashed (minidump found) > Thread 0 (crashed)
Is this the expected behavior of getSelf? What's the status on this?
Sorry didn't had enough time, I'll try to finish ASAP.
It seems now that if the app isn't installed getSelf request.result returns null so I guess the error isn't needed anymore.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Flags: needinfo?(fabrice)
Assignee: sonny.piers → nobody
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(fabrice)
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: