From: Jeremy Maitin-Shepard Date: Tue, 5 Feb 2013 06:54:16 +0000 (-0800) Subject: content_handler_view_as_text: update to async cache interface X-Git-Tag: debian-1.0--pre-1+git160130-1~183 X-Git-Url: https://repo.or.cz/w/conkeror.git/commitdiff_plain/e00669185e7df7aeb1c93e9b0905b741385d9e80 content_handler_view_as_text: update to async cache interface --- diff --git a/modules/cache.js b/modules/cache.js index c1ae926..4049691 100644 --- a/modules/cache.js +++ b/modules/cache.js @@ -35,7 +35,7 @@ function cache_entry_open(cache_session, uri) { let cc = yield CONTINUATION; - cache_listener = { + let cache_listener = { onCacheEntryAvailable: function onCacheEntryAvailable(descriptor, accessGranted, status) { if (status != Cr.NS_OK) cc.throw(cache_error(status)); @@ -58,7 +58,7 @@ function cache_entry_clear(cache_session, uri) { let cc = yield CONTINUATION; - cache_listener = { + let cache_listener = { onCacheEntryDoomed: function onCacheEntryDoomed(status) { switch (status) { case Cr.NS_OK: diff --git a/modules/content-handler.js b/modules/content-handler.js index af4bb5d..3f0aa8b 100644 --- a/modules/content-handler.js +++ b/modules/content-handler.js @@ -153,7 +153,7 @@ function content_handler_view_internally (ctx) { function content_handler_view_as_text (ctx) { ctx.abort(); // abort before reloading - override_mime_type_for_next_load(ctx.launcher.source, "text/plain"); + yield override_mime_type_for_next_load(ctx.launcher.source, "text/plain"); ctx.frame.location = ctx.launcher.source.spec; // reload }