Closed Bug 796584 Opened 13 years ago Closed 13 years ago

Don't use localStorage in pdfjs

Categories

(Firefox OS Graveyard :: Gaia, defect)

defect
Not set
normal

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
blocking-basecamp +

People

(Reporter: ghtobz, Assigned: ttaubert)

Details

(Whiteboard: [label:perf][label:mentored][label:pdf.js] QARegressExclude)

Attachments

(2 files, 2 obsolete files)

[GitHub issue by fabricedesre on 2012-08-31T14:29:27Z, https://github.com/mozilla-b2g/gaia/issues/4224] pdfjs/content/web/viewer.js:155:// First we see if localStorage is available pdfjs/content/web/viewer.js:158: var isLocalStorageEnabled = (function localStorageEnabledTest() { pdfjs/content/web/viewer.js:160: // The additional localStorage call is to get around a FF quirk, see pdfjs/content/web/viewer.js:163: return 'localStorage' in window && window['localStorage'] !== null && pdfjs/content/web/viewer.js:164: localStorage; pdfjs/content/web/viewer.js:178: database = localStorage.getItem('database') || '{}';
[GitHub comment by timdream on 2012-09-11T17:04:50Z] Adding `good first bug`. Anyone interested can replace the calls with @davidflanagan's asyncStorage.
[GitHub comment by SKatiyar on 2012-09-18T17:51:30Z] @fabricedesre, I am interested in taking up this bug.
Will work on this as there seems to be no activity from SKatiyar.
Assignee: nobody → ttaubert
Status: NEW → ASSIGNED
Attachment #666959 - Flags: review?(bdahl)
It would be ideal if this was a pull request against our github repo at https://github.com/mozilla/pdf.js/pulls . We currently treat mozcentral as a downstream project.
Yeah I thought about the pull request, will do. I wonder, is this really an upstream patch? That's not really something that touches the PDF.JS library but just the viewer that accesses the API. Also asyncStorage is custom to B2G.
Pointer to Github pull-request
Attachment #666959 - Attachment is obsolete: true
Attachment #666959 - Flags: review?(bdahl)
Attachment #667038 - Attachment is obsolete: true
Comment on attachment 667236 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/5638 Hey Brendan, is this ready to be merged to master? Following the workflow suggested by Vivien I'm going to ask for review here and then change the commit message accordingly.
Attachment #667236 - Flags: review?(bdahl)
What's the user impact if we don't take this fix?
(In reply to Alex Keybl [:akeybl] from comment #11) > What's the user impact if we don't take this fix? The scroll location of revisiting pdfs won't be remembered. As for review, I had left a comment in the github bug, I didn't realize I needed to r+ here as well.
Attachment #667236 - Flags: review?(bdahl) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [label:perf][label:mentored][label:pdf.js] → [label:perf][label:mentored][label:pdf.js] QARegressExclude
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: