From 09eb89e3c3b7ce98d66369ca5d6c41283caf9873 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 3 Aug 2019 21:13:19 +0100 Subject: Migrate query dispatch up from llcache to hlcache As a first step in refactoring query handling to be managed by `browser_window`, this migrates the calling of the query handler from the llcache object code up to the hlcache. In theory this may result in multiple queries happening for one object, but we mitigate multiple-responses in the llcache so all should be well. Signed-off-by: Daniel Silverstone --- content/hlcache.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'content/hlcache.c') diff --git a/content/hlcache.c b/content/hlcache.c index 61cdebe71..c07c5a1a1 100644 --- a/content/hlcache.c +++ b/content/hlcache.c @@ -518,6 +518,20 @@ static nserror hlcache_llcache_callback(llcache_handle *handle, ctx->handle->cb(ctx->handle, &hlevent, ctx->handle->pw); } break; + case LLCACHE_EVENT_QUERY: + if (hlcache->params.llcache.cb != NULL) { + return hlcache->params.llcache.cb( + event->data.query.query, + hlcache->params.llcache.cb_ctx, + event->data.query.cb, + event->data.query.cb_pw); + } else { + return NSERROR_NOT_IMPLEMENTED; + } + break; + case LLCACHE_EVENT_QUERY_FINISHED: + /* Currently nothing to do */ + break; } return NSERROR_OK; -- cgit v1.2.3