From 0361e0a6e4feab2d69cc60e57c25987853eb6027 Mon Sep 17 00:00:00 2001 From: Axel Hecht Date: Wed, 9 Jan 2019 00:34:45 +0000 Subject: [PATCH 1/7] Bug 1517919, put Fluent files into right subdirectory for chrome-%, r=nalexander Differential Revision: https://phabricator.services.mozilla.com/D15883 --HG-- extra : moz-landing-system : lando --- mobile/android/locales/jar.mn | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mobile/android/locales/jar.mn b/mobile/android/locales/jar.mn index 7e0ca28b2201..c5598f8b9efd 100644 --- a/mobile/android/locales/jar.mn +++ b/mobile/android/locales/jar.mn @@ -67,6 +67,9 @@ relativesrcdir dom/locales: # Note: All rules must be wildcards, as localized files are optional # Only run this if we're not en-US, as en-US is already built # by toolkit/locales/jar.mn. +# If you're including files from a subdirectory, ensure that you're +# putting them into the corresponding subdirectory in the target. +# The wildcard ** does that for us in toolkit. #define EN_US en-US #if AB_CD != EN_US @@ -74,8 +77,10 @@ relativesrcdir dom/locales: relativesrcdir toolkit/locales: #about:crashes crashreporter (%crashreporter/**/*.ftl) -#endif #about:about - toolkit (%toolkit/about/*About.ftl) + toolkit/about (%toolkit/about/*About.ftl) #about:support - toolkit (%toolkit/about/*Support.ftl) + toolkit/about (%toolkit/about/*Support.ftl) +#endif +# Do not add files below the endif. Reviewers, expand more context above +# for comments. From 549ac75f78d7bdd7d7518245015cf895345ee97a Mon Sep 17 00:00:00 2001 From: Ethan Glasser-Camp Date: Tue, 8 Jan 2019 23:52:35 +0000 Subject: [PATCH 2/7] Bug 1518292: use env instead of environment in JEXL context r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D15951 --HG-- extra : moz-landing-system : lando --- services/settings/remote-settings.js | 2 +- .../test/unit/test_remote_settings_jexl_filters.js | 6 +++--- toolkit/components/normandy/lib/RecipeRunner.jsm | 2 +- .../normandy/test/browser/browser_RecipeRunner.js | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/services/settings/remote-settings.js b/services/settings/remote-settings.js index 9476b50ea5eb..770d0dd97d9d 100644 --- a/services/settings/remote-settings.js +++ b/services/settings/remote-settings.js @@ -66,7 +66,7 @@ async function jexlFilterFunc(entry, environment) { let result; try { const context = { - environment, + env: environment, }; result = await FilterExpressions.eval(filter_expression, context); } catch (e) { diff --git a/services/settings/test/unit/test_remote_settings_jexl_filters.js b/services/settings/test/unit/test_remote_settings_jexl_filters.js index 643cf6665036..9a2ae86c6a7c 100644 --- a/services/settings/test/unit/test_remote_settings_jexl_filters.js +++ b/services/settings/test/unit/test_remote_settings_jexl_filters.js @@ -56,13 +56,13 @@ add_task(async function test_returns_entries_where_jexl_is_true() { filter_expression: "1 == 2 || 1 == 1", }, { willMatch: true, - filter_expression: 'environment.appID == "xpcshell@tests.mozilla.org"', + filter_expression: 'env.appID == "xpcshell@tests.mozilla.org"', }, { willMatch: false, - filter_expression: "environment.version == undefined", + filter_expression: "env.version == undefined", }, { willMatch: true, - filter_expression: "environment.unknown == undefined", + filter_expression: "env.unknown == undefined", }, { willMatch: false, filter_expression: "1 == 2", diff --git a/toolkit/components/normandy/lib/RecipeRunner.jsm b/toolkit/components/normandy/lib/RecipeRunner.jsm index ecdde8fe4380..ba9e8a288349 100644 --- a/toolkit/components/normandy/lib/RecipeRunner.jsm +++ b/toolkit/components/normandy/lib/RecipeRunner.jsm @@ -284,7 +284,7 @@ var RecipeRunner = { arguments: recipe.arguments, }; return { - environment, + env: environment, // Backwards compatibility -- see bug 1477255. normandy: environment, }; diff --git a/toolkit/components/normandy/test/browser/browser_RecipeRunner.js b/toolkit/components/normandy/test/browser/browser_RecipeRunner.js index 8251ec1fd462..430cbed4cd85 100644 --- a/toolkit/components/normandy/test/browser/browser_RecipeRunner.js +++ b/toolkit/components/normandy/test/browser/browser_RecipeRunner.js @@ -37,29 +37,29 @@ add_task(async function getFilterContext() { "version", ]; for (const key of expectedNormandyKeys) { - ok(key in context.environment, `environment.${key} is available`); + ok(key in context.env, `env.${key} is available`); ok(key in context.normandy, `normandy.${key} is available`); } - Assert.deepEqual(context.normandy, context.environment, + Assert.deepEqual(context.normandy, context.env, "context offers normandy as backwards-compatible alias for context.environment"); is( - context.environment.recipe.id, + context.env.recipe.id, recipe.id, "environment.recipe is the recipe passed to getFilterContext", ); delete recipe.unrelated; Assert.deepEqual( - context.environment.recipe, + context.env.recipe, recipe, "environment.recipe drops unrecognized attributes from the recipe", ); // Filter context attributes are cached. await SpecialPowers.pushPrefEnv({set: [["app.normandy.user_id", "some id"]]}); - is(context.environment.userId, "some id", "User id is read from prefs when accessed"); + is(context.env.userId, "some id", "User id is read from prefs when accessed"); await SpecialPowers.pushPrefEnv({set: [["app.normandy.user_id", "real id"]]}); - is(context.environment.userId, "some id", "userId was cached"); + is(context.env.userId, "some id", "userId was cached"); }); From 271033048d4ad8b0308936feb9718b76c433a6b7 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 9 Jan 2019 01:41:47 +0000 Subject: [PATCH 3/7] Bug 1513133 - Guard against creating an excessively large drawtarget. r=mstange Differential Revision: https://phabricator.services.mozilla.com/D15254 --HG-- extra : moz-landing-system : lando --- gfx/layers/basic/BasicLayerManager.cpp | 9 ++++++--- gfx/tests/crashtests/1513133.html | 11 +++++++++++ gfx/tests/crashtests/crashtests.list | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 gfx/tests/crashtests/1513133.html diff --git a/gfx/layers/basic/BasicLayerManager.cpp b/gfx/layers/basic/BasicLayerManager.cpp index 601645aa692f..88bbb82affda 100644 --- a/gfx/layers/basic/BasicLayerManager.cpp +++ b/gfx/layers/basic/BasicLayerManager.cpp @@ -105,9 +105,12 @@ bool BasicLayerManager::PushGroupForLayer(gfxContext* aContext, Layer* aLayer, ToRect(rect).ToIntRect(&surfRect); if (!surfRect.IsEmpty()) { - RefPtr dt = - aContext->GetDrawTarget()->CreateSimilarDrawTarget( - surfRect.Size(), SurfaceFormat::B8G8R8A8); + RefPtr dt; + if (aContext->GetDrawTarget()->CanCreateSimilarDrawTarget( + surfRect.Size(), SurfaceFormat::B8G8R8A8)) { + dt = aContext->GetDrawTarget()->CreateSimilarDrawTarget( + surfRect.Size(), SurfaceFormat::B8G8R8A8); + } RefPtr ctx = gfxContext::CreateOrNull(dt, ToRect(rect).TopLeft()); diff --git a/gfx/tests/crashtests/1513133.html b/gfx/tests/crashtests/1513133.html new file mode 100644 index 000000000000..2f4e66869170 --- /dev/null +++ b/gfx/tests/crashtests/1513133.html @@ -0,0 +1,11 @@ + +
+