Bug 575836: Fix logic here. Patch by Chris Jones <jones.chris.g@gmail.com> and Josh Aas <joshmoz@gmail.com>, r=josh/jones.chris.g, r=jst, a1.9.0.next=dveditz
git-svn-id: svn://10.0.0.236/trunk@260921 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -3001,9 +3001,10 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays()
|
||||
// to the bottom of the array if there isn't already a "src" specified.
|
||||
PRUint16 numRealAttrs = mNumCachedAttrs;
|
||||
nsAutoString data;
|
||||
if (mContent->Tag() == nsGkAtoms::object
|
||||
&& !mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::src)
|
||||
&& mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, data)) {
|
||||
if (mContent->Tag() == nsGkAtoms::object &&
|
||||
!mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::src) &&
|
||||
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, data) &&
|
||||
!data.IsEmpty()) {
|
||||
mNumCachedAttrs++;
|
||||
}
|
||||
|
||||
@@ -3051,7 +3052,7 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays()
|
||||
}
|
||||
|
||||
// if the conditions above were met, copy the "data" attribute to a "src" array entry
|
||||
if (data.Length()) {
|
||||
if (!data.IsEmpty()) {
|
||||
mCachedAttrParamNames [nextAttrParamIndex] = ToNewUTF8String(NS_LITERAL_STRING("SRC"));
|
||||
mCachedAttrParamValues[nextAttrParamIndex] = ToNewUTF8String(data);
|
||||
nextAttrParamIndex++;
|
||||
|
||||
Reference in New Issue
Block a user