Bug 1527282 - Fix caching of justify content pattern in Flexbox highlighter r=pbro
authorMichael Ratcliffe <mratcliffe@mozilla.com>
Tue, 12 Feb 2019 14:03:57 +0000
changeset 458879 6dd68e1928a6
parent 458878 c98d6ecd9e7a
child 458880 ce68e72b6fb6
push id35551
push usershindli@mozilla.com
push dateWed, 13 Feb 2019 21:34:09 +0000
treeherdermozilla-central@08f794a4928e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro
bugs1527282
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1527282 - Fix caching of justify content pattern in Flexbox highlighter r=pbro Differential Revision: https://phabricator.services.mozilla.com/D19478
devtools/server/actors/highlighters/flexbox.js
--- a/devtools/server/actors/highlighters/flexbox.js
+++ b/devtools/server/actors/highlighters/flexbox.js
@@ -259,18 +259,18 @@ class FlexboxHighlighter extends AutoRef
     let flexboxPatternMap = null;
 
     if (gCachedFlexboxPattern.has(devicePixelRatio)) {
       flexboxPatternMap = gCachedFlexboxPattern.get(devicePixelRatio);
     } else {
       flexboxPatternMap = new Map();
     }
 
-    if (gCachedFlexboxPattern.has(JUSTIFY_CONTENT)) {
-      return gCachedFlexboxPattern.get(JUSTIFY_CONTENT);
+    if (flexboxPatternMap.has(JUSTIFY_CONTENT)) {
+      return flexboxPatternMap.get(JUSTIFY_CONTENT);
     }
 
     // Create the inversed diagonal lines pattern
     // for the rendering the justify content gaps.
     const canvas = createNode(this.win, { nodeType: "canvas" });
     const zoom = getCurrentZoom(this.win);
     const width = canvas.width =
       FLEXBOX_JUSTIFY_CONTENT_PATTERN_WIDTH * devicePixelRatio * zoom;