Bug 1370734 - Fix hazards ; r=bustage

MozReview-Commit-ID: 1H4VwQ3Jdg6
This commit is contained in:
Manish Goregaokar 2017-06-07 23:41:42 -07:00
parent b90d2375d4
commit 5f46f56cb9
2 changed files with 4 additions and 2 deletions

View File

@ -218,6 +218,7 @@ function treatAsSafeArgument(entry, varName, csuName)
["Gecko_CalcStyleDifference", "aAnyStyleChanged", null],
["Gecko_nsStyleSVG_CopyContextProperties", "aDst", null],
["Gecko_nsStyleFont_PrefillDefaultForGeneric", "aFont", null],
["Gecko_nsStyleSVG_SetContextPropertiesLength", "aSvg", null],
];
for (var [entryMatch, varMatch, csuMatch] of whitelist) {
assert(entryMatch || varMatch || csuMatch);
@ -332,7 +333,8 @@ function ignoreCallEdge(entry, callee)
// We manually lock here
if (name == "Gecko_nsFont_InitSystem" ||
name == "Gecko_GetFontMetrics" ||
name == "ThreadSafeGetDefaultFontHelper")
name == "Gecko_nsStyleFont_FixupMinFontSize" ||
/ThreadSafeGetDefaultFontHelper/.test(name))
{
return true;
}

View File

@ -160,7 +160,7 @@ function check_hazards () {
exit 1
fi
NUM_ALLOWED_WRITE_HAZARDS=6
NUM_ALLOWED_WRITE_HAZARDS=3
if [ $NUM_WRITE_HAZARDS -gt $NUM_ALLOWED_WRITE_HAZARDS ]; then
echo "TEST-UNEXPECTED-FAIL $NUM_WRITE_HAZARDS heap write hazards detected out of $NUM_ALLOWED_WRITE_HAZARDS allowed" >&2
echo "TinderboxPrint: documentation<br/><a href='https://wiki.mozilla.org/Javascript:Hazard_Builds#Diagnosing_a_heap_write_hazard_failure'>heap write hazard analysis failures</a>, visit \"Inspect Task\" link for hazard details"