Bug 575172. Make sure that setting script type IDs really doesn't clobber any other flags. r=jst, a=blocking2.0

This commit is contained in:
Boris Zbarsky 2010-08-31 16:46:41 -04:00
parent f51578d775
commit 007ddb1c71

View File

@ -3521,7 +3521,7 @@ nsGenericElement::SetScriptTypeID(PRUint32 aLang)
}
/* SetFlags will just mask in the specific flags set, leaving existing
ones alone. So we must clear all the bits first */
UnsetFlags(0x000FU << NODE_SCRIPT_TYPE_OFFSET);
UnsetFlags(NODE_SCRIPT_TYPE_MASK << NODE_SCRIPT_TYPE_OFFSET);
SetFlags(aLang << NODE_SCRIPT_TYPE_OFFSET);
return NS_OK;
}