Bug 1359313 - whitelist -moz-border-*-colors related bindings to satisfy heap write analysis. r=bholley,heycam

A quick fix for hazard bustage by increase the NUM_ALLOWED_WRITE_HAZARDS
from 3 to 7 is pushed in bug 1348173 comment 37. In this bug, we shall do
the actual fix and restore the NUM_ALLOWED_WRITE_HAZARDS.

The -moz-border-*-colors bindings trigger errors because they're using
outparams (nsStyleBorder) which further manipulate its member (mBorderColors)
which is a double raw pointers. Since we don't have the ability to
whitelist the indirect access to mBorderColors[x] list, we can only add
them to the ignoreContents for now.

We might be able to move these bindings to the whitelist of the above
treatAsSafeArgument function, if we could refactor mBorderColors to use
nsTArray directly.

MozReview-Commit-ID: 2cQz58K2A10

--HG--
extra : rebase_source : af2b5b944fb9d19fe28f57eaa37f77174d48bfa4
This commit is contained in:
Jeremy Chen 2017-04-27 12:06:05 +08:00
Родитель be1376c018
Коммит 79f145e226
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -379,6 +379,10 @@ function ignoreContents(entry)
/CSSValueSerializeCalcOps::Append/, /CSSValueSerializeCalcOps::Append/,
"Gecko_CSSValue_SetFunction", "Gecko_CSSValue_SetFunction",
"Gecko_CSSValue_SetArray", "Gecko_CSSValue_SetArray",
"Gecko_EnsureMozBorderColors",
"Gecko_ClearMozBorderColors",
"Gecko_AppendMozBorderColors",
"Gecko_CopyMozBorderColors",
// Needs main thread assertions or other fixes. // Needs main thread assertions or other fixes.
/UndisplayedMap::GetEntryFor/, /UndisplayedMap::GetEntryFor/,

Просмотреть файл

@ -151,7 +151,7 @@ function check_hazards () {
exit 1 exit 1
fi fi
NUM_ALLOWED_WRITE_HAZARDS=7 NUM_ALLOWED_WRITE_HAZARDS=3
if [ $NUM_WRITE_HAZARDS -gt $NUM_ALLOWED_WRITE_HAZARDS ]; then 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 "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" 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"