Closed Bug 461569 Opened 17 years ago Closed 17 years ago

Add applicationCache.items

Categories

(Core :: Networking: Cache, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dcamp, Assigned: dcamp)

Details

(Keywords: fixed1.9.1)

Attachments

(1 file, 3 obsolete files)

Attached patch v1 (obsolete) — Splinter Review
The application cache spec replaced applicationCache.length and applicationCache.item(n) with an applicationCache.items that returns a list. The attached patch adds .items. We shipped length and item(n) with 3.0, so I didn't remove them in this patch. It might be worth taking them out now and forcing people to move to .items...
Flags: blocking1.9.1?
Attachment #344662 - Flags: superreview?(bzbarsky)
Attachment #344662 - Flags: review?(bzbarsky)
Attachment #344662 - Attachment is patch: true
Attachment #344662 - Attachment mime type: application/octet-stream → text/plain
OS: Mac OS X → All
Hardware: PC → All
+ if (rv == NS_ERROR_CACHE_KEY_NOT_FOUND || + (types & nsIApplicationCache::ITEM_DYNAMIC) == 0) { + *aExists = PR_FALSE; + return NS_OK; + } that's testing random data if rv is some other failure, no? Honza should probably review this too.
Flags: blocking1.9.1? → blocking1.9.1+
Attached patch fixed up (obsolete) — Splinter Review
Fixed up patch.
Attachment #344662 - Attachment is obsolete: true
Attachment #345616 - Flags: superreview?(bzbarsky)
Attachment #345616 - Flags: review?(honzab)
Attachment #344662 - Flags: superreview?(bzbarsky)
Attachment #344662 - Flags: review?(bzbarsky)
Attached patch right version (obsolete) — Splinter Review
err, that was the wrong version
Attachment #345616 - Attachment is obsolete: true
Attachment #345618 - Flags: superreview?(bzbarsky)
Attachment #345618 - Flags: review?(honzab)
Attachment #345616 - Flags: superreview?(bzbarsky)
Attachment #345616 - Flags: review?(honzab)
Attachment #345618 - Flags: superreview?(bzbarsky) → superreview+
Attachment #345618 - Flags: review?(honzab) → review-
Comment on attachment 345618 [details] [diff] [review] right version >diff -r 6f766cbdc7ec dom/public/idl/offline/nsIDOMOfflineResourceList.idl > [scriptable, uuid(c9732cb7-e104-4cf1-9936-a8592fd46c5a)] > interface nsIDOMOfflineResourceList : nsISupports Change IID, please. > > In the test you are not testing new hasItem method.
Attached patch v3Splinter Review
Attachment #345618 - Attachment is obsolete: true
Attachment #345749 - Flags: review?(honzab)
Comment on attachment 345749 [details] [diff] [review] v3 It would be absolutely perfect to also test that entry that is in the cache but is not dynamic is not visible to hasItem, but this ok.
Attachment #345749 - Flags: review?(honzab) → review+
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Not working in Mozilla/5.0 (Windows NT 6.1; rv:7.0a1) Gecko/20110626 Firefox/7.0a1 ID:20110626030756 console.log(window.applicationCache); console.log(window.applicationCache.mozItems); 0 items in offline cache DOMStringList { length=0} But in "Options > Advanced > Network" my site is listed with 272kb of data.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: