From 8a99b045bc48e0c5eb89129ea8ee034c72b955de Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 15 Mar 2015 00:00:45 +0000 Subject: Remove url from content thumbnailers API The content thumbnailers for each frontend were being provided the contents url. This was only ever used to call the urldb thumbnail setting API. This changes it so the single callsite that passed a valid url adds the bitmap to that url itself in desktop_history.c instead of forcing every frontend to require the urldb API. Additionally the old API could pass the url as NULL which was causing asserts where this was not an expected parameter value. Because of this this fixes bug #2286 which was also present in the monkey frontend as both called nsurl_access() on the url without the NULL check and caused an assertion. --- cocoa/thumbnail.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cocoa/thumbnail.m') diff --git a/cocoa/thumbnail.m b/cocoa/thumbnail.m index 7e524b754..bb018bc30 100644 --- a/cocoa/thumbnail.m +++ b/cocoa/thumbnail.m @@ -26,7 +26,7 @@ #import "image/bitmap.h" /* In platform specific thumbnail.c. */ -bool thumbnail_create(struct hlcache_handle *content, struct bitmap *bitmap, nsurl *url) +bool thumbnail_create(struct hlcache_handle *content, struct bitmap *bitmap) { int bwidth = bitmap_get_width( bitmap ); int bheight = bitmap_get_height( bitmap ); @@ -60,8 +60,6 @@ bool thumbnail_create(struct hlcache_handle *content, struct bitmap *bitmap, nsu bitmap_modified( bitmap ); - if (NULL != url) urldb_set_thumbnail( url, bitmap ); - return true; } -- cgit v1.2.3