зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1318506 - Label PluginInstance IPC messages with plugin's DocGroup (r=jimm)
The goal here is to assign a DocGroup to every runnable. This patch labels all IPC message handlers for PPluginInstance with the DocGroup of the plugin instance's document. MozReview-Commit-ID: 6OIard9n2GB
This commit is contained in:
Родитель
2d57ca5e03
Коммит
21912efc29
|
@ -2756,6 +2756,19 @@ PluginModuleParent::NPP_NewInternal(NPMIMEType pluginType, NPP instance,
|
|||
// Now replace it with the instance
|
||||
instance->pdata = static_cast<PluginDataResolver*>(parentInstance);
|
||||
|
||||
// Any IPC messages for the PluginInstance actor should be dispatched to the
|
||||
// DocGroup for the plugin's document.
|
||||
RefPtr<nsPluginInstanceOwner> owner = parentInstance->GetOwner();
|
||||
nsCOMPtr<nsIDOMElement> elt;
|
||||
owner->GetDOMElement(getter_AddRefs(elt));
|
||||
if (nsCOMPtr<nsINode> node = do_QueryInterface(elt)) {
|
||||
nsCOMPtr<nsIDocument> doc = node->OwnerDoc();
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIEventTarget> eventTarget = doc->EventTargetFor(dom::TaskCategory::Other);
|
||||
SetEventTargetForActor(parentInstance, eventTarget);
|
||||
}
|
||||
}
|
||||
|
||||
if (!SendPPluginInstanceConstructor(parentInstance,
|
||||
nsDependentCString(pluginType), mode,
|
||||
names, values)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче