Closed Bug 1597890 Opened 5 years ago Closed 4 years ago

[Storage] Don't log an error if private field headers are not localized

Categories

(DevTools :: Storage Inspector, defect, P2)

72 Branch
defect

Tracking

(firefox71 unaffected, firefox72 wontfix, firefox73 fixed)

RESOLVED FIXED
Firefox 73
Tracking Status
firefox71 --- unaffected
firefox72 --- wontfix
firefox73 --- fixed

People

(Reporter: bdanforth, Assigned: miker)

Details

Attachments

(1 file)

Thank you for helping make Firefox better. If you are reporting a defect, please complete the following:

What were you doing?

Please tell us what site you were on, and what steps led to the error you are reporting

I was working on Bug 1573201, where I was extending the "extensionStorage" actor, including adding a new, private isValueEditable field.

Each field becomes a table header in the Storage panel UI. This isValueEditable field is marked as private: true in devtools/server/actors/storage.js. This means it is not a column in the Storage panel that the user can view, even optionally.

Interestingly, though hidden, the column is still rendered in the Storage panel, so it still tries to localize the string, which causes the error Unable to localize table header type:extensionStorage key:isValueEditable to be logged in the Browser Console.

Since this string is never exposed to the user, we shouldn't try to localize it. Since localizing seems based on whether the string is rendered in the UI, we shouldn't render private fields at all.

Note:

  • Unfortunately, the only other two private fields in existing storage actors are uniqueKey in Cookies and IndexedDB, and both of those are listed in the devtools/client/locales/en-US/storage.properties file, so they will not produce this error, so
  • These STR require Bug 1573201 to land in Nightly 72. Or you can hg import the latest D34416 patch.
  1. Install an extension that uses storage.local like Tree Style Tabs.
  2. In about:debugging, 'Inspect' the extension.
  3. Open the Storage panel in the toolbox.
  4. Select the extension host under the "Extension Storage" actor in the tree on the left side panel.
  5. Open the Browser Console and observe the error: Unable to localize table header type:extensionStorage key:isValueEditable.

What happened?

What, if any, error messages did you see? Did the browser crash? Screenshots or screen recordings can be attached to this report and are helpful in isolating and replicating the bug.

The Browser Console logged an error: Unable to localize table header type:extensionStorage key:isValueEditable.

What should have happened?

Was was the expected result? ("Not crashing" may be a valid answer.)

There should be no such error logged to the Browser Console.

Anything else we should know?

Do you have extensions installed? You can also go to about:support in another window or tab and attach the report it generates to this bug.

No

The priority flag is not set for this bug.
:miker, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mratcliffe)
Flags: needinfo?(mratcliffe)
Priority: -- → P2
Summary: Don't render private field table headers in the Storage panel → [Storage] Don't log an error if private fields are not localized
Summary: [Storage] Don't log an error if private fields are not localized → [Storage] Don't log an error if private field headers are not localized
Assignee: nobody → mratcliffe
Pushed by mratcliffe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/71e6047322d7
[Storage] Don't log an error if private field headers are not localized r=nchevobbe
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: