Closed Bug 1467720 Opened 6 years ago Closed 6 years ago

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

Categories

(WebExtensions :: Storage, defect, P1)

62 Branch
x86_64
Linux
defect

Tracking

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

VERIFIED FIXED
mozilla62
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox60 --- unaffected
firefox61 --- unaffected
firefox62 --- verified

People

(Reporter: damien, Assigned: rpl)

References

Details

(Keywords: regression)

Attachments

(3 files)

Attached 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
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
The source code for passwe is hosted at https://gitlab.petton.fr/passwe/passwe-addon.
Assignee: nobody → lgreco
Blocks: 1406181
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
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 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 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+
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
https://hg.mozilla.org/mozilla-central/rev/c6d2c3390c0b
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Blocks: 1468040
Attached image loading passwords.jpg
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)
> 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)
Marking as verified as per https://bugzilla.mozilla.org/show_bug.cgi?id=1467720#c12.
Status: RESOLVED → VERIFIED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: