Can't access dead object in ext-storage.js:168:40

VERIFIED FIXED in Firefox 62

Status

defect
P1
normal
VERIFIED FIXED
Last year
Last year

People

(Reporter: damien, Assigned: rpl)

Tracking

({regression})

62 Branch
mozilla62
x86_64
Linux
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox60 unaffected, firefox61 unaffected, firefox62 verified)

Details

Attachments

(3 attachments)

Reporter

Description

Last year
Posted file mozregression.log
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0
Build ID: 20180607220114

Steps to reproduce:

- Install passwe addon and app
- open a webpage
- open passwe popup once and choose an entry (it works)
- open passwe popup again


Actual results:

You get "Loading password..." message and nothing happens


Expected results:

You get a list of password entries
Reporter

Updated

Last year
Has Regression Range: --- → yes
Component: Untriaged → WebExtensions: Storage
Keywords: regression
OS: Unspecified → Linux
Product: Firefox → Toolkit
Hardware: Unspecified → x86_64
See Also: → 1406181
Version: Trunk → 62 Branch
Reporter

Comment 2

Last year
The source code for passwe is hosted at https://gitlab.petton.fr/passwe/passwe-addon.
Comment hidden (mozreview-request)
Assignee

Updated

Last year
Assignee: nobody → lgreco
Blocks: 1406181
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
Assignee

Updated

Last year
Duplicate of this bug: 1467727

Comment 5

Last year
mozreview-review
Comment on attachment 8984386 [details]
Bug 1467720 - Fix "dead object" error raised from ext-storage.js on browser.storage.local API calls.

https://reviewboard.mozilla.org/r/250210/#review256766

::: toolkit/components/extensions/ExtensionStorageIDB.jsm:371
(Diff revision 1)
>        if (context.childManager) {
> +        // Create a promise object that is not tied to the current extension context, because
> +        // we are caching it for the entire life of the extension in the current process (and
> +        // the promise returned by context.childManager.callParentAsyncFunction would become
> +        // a dead object when the context.cloneScope has been destroyed).
> +        promise = new Promise(async (resolve, reject) => {

I think this could be simplified a bit without needing new Promise().  e.g
```
promise = (async () {
  let result = await ...callParent(...);
  if (result.backendEnabled) {
    return { ...result, storagePrincipal: ...};
  } else {
    return {backendEnabled: false};
  }
})();
```
Comment hidden (mozreview-request)
Assignee

Comment 7

Last year
mozreview-review-reply
Comment on attachment 8984386 [details]
Bug 1467720 - Fix "dead object" error raised from ext-storage.js on browser.storage.local API calls.

https://reviewboard.mozilla.org/r/250210/#review256766

> I think this could be simplified a bit without needing new Promise().  e.g
> ```
> promise = (async () {
>   let result = await ...callParent(...);
>   if (result.backendEnabled) {
>     return { ...result, storagePrincipal: ...};
>   } else {
>     return {backendEnabled: false};
>   }
> })();
> ```

yeah, they do basically the same thing, but using the async function makes it simpler and it also looks better.

change applied!
Blocks: 1467827

Comment 8

Last year
mozreview-review
Comment on attachment 8984386 [details]
Bug 1467720 - Fix "dead object" error raised from ext-storage.js on browser.storage.local API calls.

https://reviewboard.mozilla.org/r/250210/#review256852
Attachment #8984386 - Flags: review?(aswan) → review+

Comment 9

Last year
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/c6d2c3390c0b
Fix "dead object" error raised from ext-storage.js on browser.storage.local API calls. r=aswan

Comment 10

Last year
bugherder
https://hg.mozilla.org/mozilla-central/rev/c6d2c3390c0b
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla62

Updated

Last year
Blocks: 1468040

Comment 11

Last year
I've tried to reproduce the issue using a fresh profile on the latest nightly build but opened the pop-up and it's stuck loading with the message "Loading passwords...", I think this might be an extension related issue, can you please take a look?
Tested on Windows 10 64Bit in Firefox 62.0a1 (20180618100844).
Attached screenshot.
Flags: needinfo?(damien)
Reporter

Comment 12

Last year
> it's stuck loading with the message "Loading passwords..."

the add-on requires an external app (https://gitlab.petton.fr/passwe/passwe-app) as well as a password-store directory.

> can you please take a look?

for me, the bug reported here has been fixed for a few days. I can successfully use my add-on again.

Thanks
Flags: needinfo?(damien)

Comment 13

Last year
Marking as verified as per https://bugzilla.mozilla.org/show_bug.cgi?id=1467720#c12.
Status: RESOLVED → VERIFIED

Updated

Last year
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.