Closed
Bug 1054418
Opened 10 years ago
Closed 10 years ago
cache2 automation: browser_cmd_appcache_valid.js fails with cache2 enabled
Categories
(Core :: Networking: Cache, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: jduell.mcbugs, Assigned: sworkman)
References
Details
Attachments
(1 file, 1 obsolete file)
1.34 KB,
patch
|
michal
:
review+
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
See 'dt' test failures in
https://tbpl.mozilla.org/?tree=Try&rev=a1ea7549c4fd
225 INFO TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/commandline/test/browser_cmd_appcache_valid.js | html output for 'appcache clear' should match /successfully/. Actual textContent: "[Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsICacheService.evictEntries]"
Looks like we're calling EvictEntries and it's not implemented.
Assignee | ||
Comment 1•10 years ago
|
||
Taking a look at this now. Looks like we could rewrite AppCacheUtils.clearAll to use Services.cache2 instead of .cache.
Let me see what I can do...
Assignee: nobody → sworkman
Assignee | ||
Comment 2•10 years ago
|
||
I have a fix that seems to work locally. So, let's see what happens on try. (Inserted a patch to enable cache2 on tests first).
https://tbpl.mozilla.org/?tree=Try&rev=3ad353d01879
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=3ad353d01879
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8473921 -
Flags: review?(michal.novotny)
Reporter | ||
Comment 4•10 years ago
|
||
Be careful--IIRC the appcache is still using the cache1 APIs (i.e. it's actually still using the old cache). We removed the IDLs for the old cache, but added internal APIs for accessing it. See bug 999577 (look at nsCacheService.h/cpp). So I'm guessing you just need a call to EvictEntriesInternal()?
Reporter | ||
Comment 5•10 years ago
|
||
Ah, I see this is JS code. Hmm. We might need to re-expose the nsICacheService.evictEntries function somehow (maybe give it a deprecated-sounding name like evictEntriesDeprecated()) if I'm right about needing to use the v1 code here.
Reporter | ||
Comment 6•10 years ago
|
||
Sounds like it's worth a grep through the tree for old uses of the nsCacheService IDLs, in case we missed any others.
Assignee | ||
Comment 7•10 years ago
|
||
(In reply to Jason Duell (:jduell) from comment #5)
> Ah, I see this is JS code. Hmm. We might need to re-expose the
> nsICacheService.evictEntries function somehow (maybe give it a
> deprecated-sounding name like evictEntriesDeprecated()) if I'm right about
> needing to use the v1 code here.
Unsure. Looks like the v2 api I used uses internal v1 apis anyway.
Assignee | ||
Comment 8•10 years ago
|
||
(In reply to Jason Duell (:jduell) from comment #6)
> Sounds like it's worth a grep through the tree for old uses of the
> nsCacheService IDLs, in case we missed any others.
Did a little bit of pruning in bug 1054572. Mostly redundant references that can be cleaned up. Excludes FTP code which needs more attention and is covered in bug 913827.
Comment 9•10 years ago
|
||
Comment on attachment 8473921 [details] [diff] [review]
v1.0 Rewrite AppCacheUtils.jsm to use HTTP Cache v2 APIs
Review of attachment 8473921 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/devtools/shared/AppCacheUtils.jsm
@@ +298,5 @@
> + }
> +
> + let appCacheStorage = Services.cache2.appCacheStorage(LoadContextInfo.default, null);
> + appCacheStorage.asyncEvictStorage({
> + onCacheEntryDoomed: function(result) {}
you can pass null as the callback
Attachment #8473921 -
Flags: review?(michal.novotny) → review+
Assignee | ||
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Comment 12•10 years ago
|
||
Please nominate this for Aurora/Beta approval :)
status-firefox32:
--- → affected
status-firefox33:
--- → affected
status-firefox34:
--- → fixed
Flags: needinfo?(sworkman)
Reporter | ||
Comment 13•10 years ago
|
||
Comment on attachment 8473921 [details] [diff] [review]
v1.0 Rewrite AppCacheUtils.jsm to use HTTP Cache v2 APIs
Approval Request Comment
[Feature/regressing bug #]: cache2
[User impact if declined]: cache2 doesn't pass automated tests
[Describe test coverage new/current, TBPL]: existing browser_cmd_appcache_valid.js showed the bug (and the fix)
[Risks and why]: test was using deprecated API: low risk
[String/UUID change made/needed]: none
Attachment #8473921 -
Flags: approval-mozilla-beta?
Attachment #8473921 -
Flags: approval-mozilla-aurora?
Flags: needinfo?(sworkman)
Updated•10 years ago
|
Attachment #8473921 -
Flags: approval-mozilla-beta?
Attachment #8473921 -
Flags: approval-mozilla-beta+
Attachment #8473921 -
Flags: approval-mozilla-aurora?
Attachment #8473921 -
Flags: approval-mozilla-aurora+
Updated•10 years ago
|
Flags: qe-verify-
Flags: in-testsuite+
Assignee | ||
Comment 14•10 years ago
|
||
This should help fix the mochitest failure in test_classified_annotations.html. Turns out that nsChannelClassifier was still using nsICacheEntryDescriptor from cache v1; so it wasn't writing or reading any cache entry metadata. Seems like nsChannelClassifier is not dependent on the cache, but we should still land this asap on m-c and try to land on aurora and beta.
Attachment #8476290 -
Flags: review?(mmc)
Assignee | ||
Updated•10 years ago
|
Attachment #8476290 -
Attachment is obsolete: true
Attachment #8476290 -
Flags: review?(mmc)
Comment 15•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•