Closed Bug 1103177 Opened 9 years ago Closed 9 years ago

[e10s] Native plugin windows in torn out tabs remain associated with original window


(Core Graveyard :: Plug-ins, defect)

Not set


(e10sm5+, firefox38 fixed)

Tracking Status
e10s m5+ ---
firefox38 --- fixed


(Reporter: jimm, Assigned: jimm)




(1 file)


1) open a test plugin page
2) open another tab
3) tear the test plugin page out to a new window

result: plugin window remains visible in original window.
Assignee: nobody → jmathies
nsIWidget has a ReparentNativeWidget call which I'm hoping gets called here. Neither PuppetWidget or PluginWidgetProxy handle this correctly.
SwapWithOtherRemoteLoader fails to invoke the BeginSwapDocShells/EndSwapDocShells methods on the documents in the child processes, so frames like nsPluginFrame never get a notification.

Here's the nsPluginFrame stack in single process:

xul.dll!nsPluginFrame::BeginSwapDocShells(nsISupports * aSupports, void * __formal)
xul.dll!EnumerateObservers(nsPtrHashKey<nsISupports> * aEntry, void * aData)
xul.dll!nsTHashtable<nsPtrHashKey<nsISupports> >::s_EnumStub(PLDHashTable * aTable, PLDHashEntryHdr * aEntry, unsigned int aNumber, void * aArg)
xul.dll!PLDHashTable::Enumerate(PLDHashOperator (PLDHashTable *, PLDHashEntryHdr *, unsigned int, void *) * aEtor, void * aArg)
xul.dll!PL_DHashTableEnumerate(PLDHashTable * aTable, PLDHashOperator (PLDHashTable *, PLDHashEntryHdr *, unsigned int, void *) * aEtor, void * aArg)
xul.dll!nsTHashtable<nsPtrHashKey<nsISupports> >::EnumerateEntries(PLDHashOperator (nsPtrHashKey<nsISupports> *, void *) * aEnumFunc, void * aUserArg)
xul.dll!nsIDocument::EnumerateActivityObservers(void (nsISupports *, void *) * aEnumerator, void * aData)
xul.dll!BeginSwapDocShellsForDocument(nsIDocument * aDocument, void * __formal)
xul.dll!BeginSwapDocShellsForViews(nsView * aSibling)
xul.dll!nsSubDocumentFrame::BeginSwapDocShells(nsIFrame * aOther)
xul.dll!nsFrameLoader::SwapWithOtherLoader(nsFrameLoader * aOther, nsRefPtr<nsFrameLoader> & aFirstToSwap, nsRefPtr<nsFrameLoader> & aSecondToSwap)
Blocks: 918634
Interesting and a little odd that the swap calls are static methods on nsPluginFrame -

We call these for all activity observers, and the method then figure out if the observer is in fact a plugin.

Anyway, somehow we need to get this forwarded over. Plus we need to figure out how to get the information over for reparenting these native windows.

It might be interesting to consider that we also want to support this with multiple content process...
I can fix this without going over ipc to the child, but I'll need the widget tracking implemented in bug 1095754.
Depends on: 1095754
Blocks: 1106243
Attached patch patchSplinter Review
This takes care of proper plugin parenting after a tab gets dragged out.
Attachment #8560402 - Flags: review?(roc)

dom/base/nsFrameLoader.cpp.rej ???
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Flags: needinfo?(jmathies)
(In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #9)
> dom/base/nsFrameLoader.cpp.rej ???

Flags: needinfo?(jmathies)
(In reply to Jim Mathies [:jimm] from comment #10)
> (In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #9)
> >
> > 
> > dom/base/nsFrameLoader.cpp.rej ???
> oops!
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.