Bug 575836: Fix logic here. r=jst
authorChris Jones <jones.chris.g@gmail.com>
Mon, 12 Jul 2010 18:21:27 -0500
changeset 47341 9bd68d16390eda2916bacb30740ef77c7b053a28
parent 47340 869c27d951895e3dce118c051a617cd6f52ba638
child 47342 74401175c3e687a82b7f7239af4622700f430861
push id14349
push usercjones@mozilla.com
push dateMon, 12 Jul 2010 23:21:38 +0000
treeherdermozilla-central@9bd68d16390e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst
bugs575836
milestone2.0b2pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 575836: Fix logic here. r=jst
layout/generic/nsObjectFrame.cpp
--- a/layout/generic/nsObjectFrame.cpp
+++ b/layout/generic/nsObjectFrame.cpp
@@ -3384,17 +3384,18 @@ nsresult nsPluginInstanceOwner::EnsureCa
   // Some plugins were never written to understand the "data" attribute of the OBJECT tag.
   // Real and WMP will not play unless they find a "src" attribute, see bug 152334.
   // Nav 4.x would simply replace the "data" with "src". Because some plugins correctly
   // look for "data", lets instead copy the "data" attribute and add another entry
   // to the bottom of the array if there isn't already a "src" specified.
   nsAutoString data;
   if (mContent->Tag() == nsGkAtoms::object &&
       !mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::src) &&
-      mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, data)) {
+      mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, data) &&
+      !data.IsEmpty()) {
     mNumCachedAttrs++;
   }
 
   // "plugins.force.wmode" preference is forcing wmode type for plugins
   // possible values - "opaque", "transparent", "windowed"
   nsAdoptingCString wmodeType = nsContentUtils::GetCharPref("plugins.force.wmode");
   if (!wmodeType.IsEmpty()) {
     mNumCachedAttrs++;