Note: There are a few cases of duplicates in user autocompletion which are being worked on.

NS_NATIVE_WINDOW value should not be used as IPC shareable

RESOLVED FIXED in mozilla9

Status

()

Core
Widget
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

Trunk
mozilla9
x86
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

(Assignee)

Description

6 years ago
http://hg.mozilla.org/mozilla-central/rev/f1d496722775#l11.29
We are using widget->GetNativeData(NS_NATIVE_WINDOW) value to send it over IPC.. that is probably correct for windows, but not for Linux and other platforms.
(Assignee)

Comment 1

6 years ago
Created attachment 556765 [details] [diff] [review]
Provide NS_NATIVE_SHAREABLE_WINDOW native widget data.
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #556765 - Flags: review?(roc)
(Assignee)

Updated

6 years ago
Blocks: 590299
(Assignee)

Comment 2

6 years ago
Created attachment 556768 [details] [diff] [review]
Also crossprocess shareable window within puppet widget
Attachment #556768 - Flags: review?(roc)
Attachment #556765 - Flags: review?(roc) → review+
Comment on attachment 556768 [details] [diff] [review]
Also crossprocess shareable window within puppet widget

Review of attachment 556768 [details] [diff] [review]:
-----------------------------------------------------------------

This patch assumes PuppetWidgets are always associated with the same toplevel browser window. That might not always be true, e.g. in multiprocess desktop Firefox it's probably not going to be true when you drag tabs from one window to another.

So PuppetWidget::GetNativeData probably needs to call SendGetNativeWidgetData every time, or else we need a way to update the cached value.
(Assignee)

Comment 4

6 years ago
Is widget SetParent/Reparent the only place where window could be changed or is there are any other place can do that?
(Assignee)

Comment 5

6 years ago
Created attachment 556862 [details] [diff] [review]
crossprocess shareable window within puppet widget
Attachment #556768 - Attachment is obsolete: true
Attachment #556768 - Flags: review?(roc)
Attachment #556862 - Flags: review?(jones.chris.g)
(Assignee)

Updated

6 years ago
Attachment #556862 - Flags: review?(roc)
(In reply to Oleg Romashin (:romaxa) from comment #4)
> Is widget SetParent/Reparent the only place where window could be changed or
> is there are any other place can do that?

I don't think we'd call SetParent on PuppetWidgets when moving a content-process tab between windows, because the PuppetWidget doesn't know about the native widget parent.
Attachment #556862 - Flags: review?(roc) → review+
(Assignee)

Updated

6 years ago
Attachment #556862 - Flags: review?(jones.chris.g)
(Assignee)

Updated

6 years ago
Keywords: checkin-needed

Comment 7

6 years ago
(In reply to Oleg Romashin (:romaxa) from comment #0)
> http://hg.mozilla.org/mozilla-central/rev/f1d496722775#l11.29
> We are using widget->GetNativeData(NS_NATIVE_WINDOW) value to send it over
> IPC.. that is probably correct for windows, but not for Linux and other
> platforms.

Oleg, could you please give background for this patch? Why can't we pass GetNativeData(NS_NATIVE_WINDOW) through ipc and what magic you add to achieve this?
(Assignee)

Comment 8

6 years ago
because NS_NATIVE_WINDOW return shareable handle only on window HWND.
on linux Gtk/Qt that returns Toolkit objects (GdkWindow  or QWidget), and obviously you cannot share that across the processes. Only XID (XServer window can be shared on linux) and on mac someone else there are should be some displayPort or something like that..
Thanks roc.
Oleg, has this been through try or do I need to test it with some stuff I'm pushing now?
Comment on attachment 556862 [details] [diff] [review]
crossprocess shareable window within puppet widget

(Missing commit message/author)
(Assignee)

Updated

6 years ago
Summary: NS_NATIVE_WINDOW value used incorrectly in Accessible implementation → NS_NATIVE_WINDOW value should not be used as IPC shareable
(Assignee)

Comment 12

6 years ago
Created attachment 557162 [details] [diff] [review]
Provide NS_NATIVE_SHAREABLE_WINDOW native widget data. TO PUSH

Folded patch
(Assignee)

Comment 13

6 years ago
Sent to try server:
http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=b7f33be9a97e
http://hg.mozilla.org/integration/mozilla-inbound/rev/e43df9a4b36e
Keywords: checkin-needed
Target Milestone: --- → mozilla9
http://hg.mozilla.org/mozilla-central/rev/e43df9a4b36e
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.