Commit 2e0c58ca authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez Committed by imoraru@mozilla.com
Browse files

Bug 1967507 - Make CSS loader not count privileged sheets for testing.

This prevents browser_css_cache from spuriously failing on ASAN builds
after the last patch, since now creating the accessiblecaret doesn't
force a flush (and thus might not force accessiblecaret.css to be
parsed).
parent b516e5ce
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1510,7 +1510,10 @@ Loader::Completed Loader::ParseSheet(
  }
  AUTO_PROFILER_LABEL_CATEGORY_PAIR_RELEVANT_FOR_JS(LAYOUT_CSSParsing);

  // TODO(emilio): fix browser_css_cache.js to deal with accessiblecaret.css.
  if (!loadData->mURI || !IsPrivilegedURI(loadData->mURI)) {
    ++mParsedSheetCount;
  }

  loadData->mIsBeingParsed = true;

+1 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ async function testCached(origin, isCached) {
    return SpecialPowers.getDOMWindowUtils(content).parsedStyleSheets;
  });

  ok(numParsed == 0 || numParsed == 1, `Where did that stylesheet come from expected 0 or 1, got ${numParsed}`);
  // Stylesheets is cached if numParsed is 0.
  is(!numParsed, isCached, `${origin} is${isCached ? " " : " not "}cached`);
}