Closed Bug 445520 Opened 16 years ago Closed 16 years ago

flashblock broken on trunk

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ted, Assigned: jst)

References

()

Details

(Keywords: fixed1.9.0.6, Whiteboard: [needed for 438830])

Attachments

(3 files)

I don't have a smaller testcase here, sorry, but installing flashblock 1.5.6 and loading the URL, then clicking on the placeholder under "Adobe Flash Player" is broken. Works: 2008062703 Broken: 2008062804 Suspicious checkins in that range: (and there are a lot) mpalmgren Friday, June 27, 2008 10:05:08 AM 352ccf413e87 Remove the element from the id map when it's removed from the document. b=441994 r+sr=roc jst Friday, June 27, 2008 3:39:47 PM ca7ab6dd624d Fixing bug 421833. Deal better with plugin frames going away while initializing a plugin. r+sr=jonas@sicking.cc jst Friday, June 27, 2008 3:28:20 PM ac132709a917 First part of the fix for bug 435334. Move the JVM auth tools from the OJI code into the plugin code. The code in question is in no way dependent on OJI and will be completely removed once the NPAPI has support for what this code offers. r=joshmoz@gmail.com, sr=jonas@sicking.cc smichaud Friday, June 27, 2008 1:12:58 PM bbf964160ffb Crash when closing pop-under window without focusing it. b=433644 r=josh sr=roc jst Friday, June 27, 2008 4:20:53 PM 4ee9ac6759cd Landing fix for bug 319371. Fix how we call NPP_GetURLNotify() in cases where the network load fails. Patch by wbardwel@curl.com, r+sr=jst@mozilla.org jst Friday, June 27, 2008 3:55:02 PM 2645e2e39b3b Fixing bug 438830. Prevent instantiation of a plugin if it's already been instantiated. r+sr=jonas@sicking.cc If I had to guess, I'd say bug 421833 or bug 438830 are pretty likely targets.
Simpler testcase, still requires flashblock installed. Interestingly, with this testcase if I click, then click "Back" and then "Forward", the flash loads.
Backing out the patch from bug 438830 fixes this. (Specifically, `hg export 2645e2e39b3b | patch -p1 -R`)
Blocks: 438830
Note that Flashblock isn't broken in all cases, just when embedding using SWFObject 1.5 or older, or a similar method. Of course, this means youtube is broken, which is a bummer.
Any ideas, guys?
I chatted with jst about this. He's aware of it, just hasn't had time to look into it.
Attached file Minimized testcase
Attaching minimized testcase. The important bits here are: the Flash tag is removed from document and then reinserted, and its src attribute is removed and then set again. Apparently, we already have a plugin instance when we are changing the src attribute which is why the plugin is reinitialized.
Attached file Minimized testcase
Attaching minimized testcase. The important bits here are: the Flash tag is removed from document and then reinserted, and its src attribute is removed and then set again. Apparently, we already have a plugin instance when we are changing the src attribute which is why the plugin isn't reinitialized.
So what happens here is that when you click the icon in the flash area to unblock the flash plugin script (flashblock) ends up touching the plugin element. When that happens we instantiate the plugin so that the script sees the DOM node with the plugins scriptable properties etc. Now at this time the src attribute of the plugin is about:blank (or it has no source attribute), but we know its type so we go ahead and instantiate a flash plugin at this point. Then immediately after that the script sets the src of the plugin and we go to attempt to re-instantiate the plugin. At this point, the plugin frame exists (as it did earlier too), but we have not yet done the first reflow, so nsObjectLoadingContent::TryInstantiate() returns early and we never tell the flash plugin to load the actual flash animation. bz, biesi, the code in TryInstantiate() came in as part of bug 390385, but it really doesn't seem correct to me. If the src attribute of a plugin changes, we *must* re-instantiate the plugin no matter what, don't we? If the plugin frame has been instantiated etc, but no yet reflown, we still need to kill the plugin and reinstantiate with the right URI AFAICT. Removing the check to see if the frame is not yet had its first reflow fixes this problem here.
Hm, I forgot the case that the plugin might've been instantiated before the first reflow. I think we still want to not instantiate before the first reflow in the normal case and only do it if there's a plugin already, because instantiating before reflow means the plugin doesn't know the right size yet.
Biesi, do you think this is good enough? If not, the other way I could see this being fixable would be to tear down the plugin in the frame once we get here so that the plugin gets re-instantiated once the frame is reflown. Not sure if that would work out better or not.
Assignee: nobody → jst
Status: NEW → ASSIGNED
Attachment #332387 - Flags: superreview?(bzbarsky)
Attachment #332387 - Flags: review?(cbiesinger)
Attachment #332387 - Flags: superreview?(bzbarsky) → superreview+
Flags: wanted1.9.0.x+
Whiteboard: [needed for 438830]
Attachment #332387 - Flags: review?(cbiesinger) → review+
Johnny, is this good enough for the 1.9 branch? Can we get this landed on trunk tonight?
I wasn't able to land this yesterday due to the state of the tree, but it's in now. This is fine material for the 1.9 branch, especially since it's required for being able to land bug 438830 on the branch.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Pardon me for asking, but with all the different browser repositories and branches now being used, it's not clear to me if this patch landed in a place where it will immediately affect FF 3.0.2 or SM nightly trunk builds. Will it?
Comment on attachment 332387 [details] [diff] [review] Re-instantiate plugin in TryInstantiate() if the frame already has a plugin instance. Approved for 1.9.0.2. Please land in CVS. a=ss
Attachment #332387 - Flags: approval1.9.0.2+
(In reply to comment #13) > Pardon me for asking, but with all the different browser repositories and > branches now being used, it's not clear to me if this patch landed in a > place where it will immediately affect FF 3.0.2 or SM nightly trunk builds. > Will it? The "trunk" right now is mozilla-central, which is building Firefox 3.1a2pre. The latest SeaMonkey nightlies should be building using that same code as well (although I don't know the version number they're using). This patch hasn't landed on the 1.9.0 branch (which will produce Firefox 3.0.2) yet, but bug 438830, which caused the problem, hasn't landed there either.
Thanks Ted, Very helpful.
Fix landed in CVS.
Keywords: fixed1.9.0.2
Verified in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a2pre) Gecko/20080816032044 Minefield/3.1a2pre Thanks!
Status: RESOLVED → VERIFIED
Depends on: 450949
Ted, Re-Open based on Bug 450949 ?
I don't have the Shockwave plugin, so I can't confirm this.
It's working great in SeaMonkey now, thanks!
> Ted, Re-Open based on Bug 450949 ? The crash occurs in the shockwave plugin and only on OSX. Leaving this as FIXED; confirmed on: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a2pre) Gecko/20080817033619 Minefield/3.1a2pre Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.2pre) Gecko/2008081705 GranParadiso/3.0.2pre
Backed out on CVS HEAD.
Keywords: fixed1.9.0.2
Comment on attachment 332387 [details] [diff] [review] Re-instantiate plugin in TryInstantiate() if the frame already has a plugin instance. Pushing out to 1.9.0.3.
Attachment #332387 - Flags: approval1.9.0.3?
Attachment #332387 - Flags: approval1.9.0.2-
Attachment #332387 - Flags: approval1.9.0.2+
Attachment #332387 - Flags: approval1.9.0.4? → approval1.9.0.4-
Comment on attachment 332387 [details] [diff] [review] Re-instantiate plugin in TryInstantiate() if the frame already has a plugin instance. Need the regression fixed before we can approve this
Flags: blocking1.9.0.6+
Comment on attachment 332387 [details] [diff] [review] Re-instantiate plugin in TryInstantiate() if the frame already has a plugin instance. bug 450949 seems to have been resolved by a newer Shockwave, let's try to go ahead with this.
Attachment #332387 - Flags: approval1.9.0.6?
Attachment #332387 - Flags: approval1.9.0.6? → approval1.9.0.6+
Comment on attachment 332387 [details] [diff] [review] Re-instantiate plugin in TryInstantiate() if the frame already has a plugin instance. Approved for 1.9.0.6, a=dveditz for release-drivers
Fix landed in CVS again.
Keywords: fixed1.9.0.6
I'm running on Windows XP with Flashblock 1.5.6. Using Firefox 3.0.5 and the nightly 3.0.6 build (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6pre) Gecko/2009011606 GranParadiso/3.0.6pre), I am seeing no difference of behavior with the test cases here. Flashblock seems to be working normally in both instances.
Al, Flashblock would have broke if bug 438830 had landed alone. Since it works fine, that means that this patch indeed landed and that this bug is fixed on the branch.
Even though the behavior is the same in 1.9.0.5?
Yeah. Had we landed bug 438830 in 1.9.0.5, it would have broken Flashblock on the trunk. The other way we could have done this was a complete roll up patch in bug 438850 and your verification of this bug would be that Flashblock still worked because initially the patch there broke Flashblock. (Am I making sense? I feel like I'm only being semi-clear for some reason. *sigh*)
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: