Bug 927688 - Enable background thumbnailing on beta and release. r=markh,gps

This commit is contained in:
Drew Willcoxon 2013-10-24 17:17:46 -07:00
parent 253d4edc51
commit 313b0c24ef
7 changed files with 6 additions and 36 deletions

View File

@ -10,9 +10,7 @@ let Ci = Components.interfaces;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/PageThumbs.jsm");
#ifndef RELEASE_BUILD
Cu.import("resource://gre/modules/BackgroundPageThumbs.jsm");
#endif
Cu.import("resource://gre/modules/NewTabUtils.jsm");
Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js");

View File

@ -131,12 +131,10 @@ Site.prototype = {
if (this.isPinned())
this._updateAttributes(true);
#ifndef RELEASE_BUILD
// request a staleness check for the thumbnail, which will cause page.js
// Capture the page if the thumbnail is missing, which will cause page.js
// to be notified and call our refreshThumbnail() method.
BackgroundPageThumbs.captureIfMissing(this.url);
// but still display whatever thumbnail might be available now.
#endif
this.refreshThumbnail();
},

View File

@ -2,13 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* WARNING: BackgroundPageThumbs.jsm is currently excluded from release builds.
* If you use it, you must also exclude your caller when RELEASE_BUILD is
* defined, as described here:
* https://wiki.mozilla.org/Platform/Channel-specific_build_defines
*/
const EXPORTED_SYMBOLS = [
"BackgroundPageThumbs",
];
@ -40,11 +33,6 @@ const BackgroundPageThumbs = {
*
* The page is loaded anonymously, and plug-ins are disabled.
*
* WARNING: BackgroundPageThumbs.jsm is currently excluded from release
* builds. If you use it, you must also exclude your caller when
* RELEASE_BUILD is defined, as described here:
* https://wiki.mozilla.org/Platform/Channel-specific_build_defines
*
* @param url The URL to capture.
* @param options An optional object that configures the capture. Its
* properties are the following, and all are optional:
@ -86,11 +74,6 @@ const BackgroundPageThumbs = {
* Asynchronously captures a thumbnail of the given URL if one does not
* already exist. Otherwise does nothing.
*
* WARNING: BackgroundPageThumbs.jsm is currently excluded from release
* builds. If you use it, you must also exclude your caller when
* RELEASE_BUILD is defined, as described here:
* https://wiki.mozilla.org/Platform/Channel-specific_build_defines
*
* @param url The URL to capture.
* @param options An optional object that configures the capture. See
* capture() for description.

View File

@ -3,6 +3,4 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
toolkit.jar:
#ifndef RELEASE_BUILD
+ content/global/backgroundPageThumbsContent.js (content/backgroundPageThumbsContent.js)
#endif

View File

@ -12,9 +12,7 @@ EXTRA_COMPONENTS += [
]
EXTRA_JS_MODULES += [
'BackgroundPageThumbs.jsm',
'PageThumbs.jsm',
'PageThumbsWorker.js',
]
if not CONFIG['RELEASE_BUILD']:
EXTRA_JS_MODULES += ['BackgroundPageThumbs.jsm']

View File

@ -2,18 +2,9 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
ifndef RELEASE_BUILD
MOCHITEST_BROWSER_FILES += \
browser_thumbnails_background.js \
browser_thumbnails_update.js \
thumbnails_background.sjs \
thumbnails_update.sjs \
$(NULL)
ifdef MOZ_CRASHREPORTER
MOCHITEST_BROWSER_FILES += \
browser_thumbnails_background_crash.js \
thumbnails_crash_content_helper.js \
$(NULL)
endif
endif

View File

@ -5,7 +5,10 @@ support-files =
background_red_scroll.html
head.js
privacy_cache_control.sjs
thumbnails_background.sjs
thumbnails_update.sjs
[browser_thumbnails_background.js]
[browser_thumbnails_bug726727.js]
[browser_thumbnails_bug727765.js]
[browser_thumbnails_bug818225.js]
@ -15,3 +18,4 @@ support-files =
[browser_thumbnails_redirect.js]
[browser_thumbnails_storage.js]
[browser_thumbnails_storage_migrate3.js]
[browser_thumbnails_update.js]