Bug 126511 - build.webkit.org/dashboard should still function if localStorage is disabled
Summary: build.webkit.org/dashboard should still function if localStorage is disabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-05 23:33 PST by Tim Horton
Modified: 2014-01-06 12:47 PST (History)
2 users (show)

See Also:


Attachments
patch (1.84 KB, patch)
2014-01-05 23:43 PST, Tim Horton
no flags Details | Formatted Diff | Diff
patch that hides the gear (3.54 KB, patch)
2014-01-06 11:07 PST, Tim Horton
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2014-01-05 23:33:00 PST
Right now, the dashboard completely fails to load if localStorage is run-time disabled or not built into the browser.
Comment 1 Tim Horton 2014-01-05 23:43:13 PST
Created attachment 220416 [details]
patch
Comment 2 Alexey Proskuryakov 2014-01-06 08:43:59 PST
Comment on attachment 220416 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=220416&action=review

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Settings.js:44
> +            console.log("Couldn't use localStorage, settings won't work: " + e);

Can we hide the gear icon if it's not going to work anyway? Or is this warning incorrect, and it will work, just not persistently?
Comment 3 Tim Horton 2014-01-06 11:07:04 PST
Created attachment 220441 [details]
patch that hides the gear
Comment 4 Alexey Proskuryakov 2014-01-06 11:59:55 PST
Comment on attachment 220441 [details]
patch that hides the gear

View in context: https://bugs.webkit.org/attachment.cgi?id=220441&action=review

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Settings.js:45
> +        try {
> +            localStorage.setItem(key, JSON.stringify(value));
> +        } catch(e) {
> +            console.log("Couldn't use localStorage, settings won't work: " + e);
> +        }

Do we need this try/catch now? Seems helpful to have breakage clearly visible.
Comment 5 Tim Horton 2014-01-06 12:47:30 PST
http://trac.webkit.org/changeset/161360