Closed Bug 1060433 Opened 11 years ago Closed 4 years ago

nsIDOMWindowUtils.getScrollbarSize fails with e10s content

Categories

(Core :: DOM: Content Processes, defect, P3)

x86_64
All
defect

Tracking

()

RESOLVED INVALID
Tracking Status
e10s + ---

People

(Reporter: jimm, Unassigned)

References

()

Details

http://mxr.mozilla.org/mozilla-central/ident?i=getScrollbarSize&tree=mozilla-central&filter= STR: 1) open a new e10s window 2) open a single tab to google.com 3) open the browser console and eval: let sbWidth = {}, sbHeight = {}; gBrowser.tabs[0].linkedBrowser.contentDocumentAsCPOW.defaultView.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).getScrollbarSize(false, sbWidth, sbHeight); result: undefined Permission denied to access property 'value' Properties seem to work - gBrowser.tabs[0].linkedBrowser.contentDocumentAsCPOW.defaultView.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).imageAnimationMode; 0 gBrowser.tabs[0].linkedBrowser.contentDocumentAsCPOW.defaultView.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).docCharsetIsForced; false some methods work - gBrowser.tabs[0].linkedBrowser.contentDocumentAsCPOW.defaultView.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).getCursorType(); 34 gBrowser.tabs[0].linkedBrowser.contentDocumentAsCPOW.defaultView.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).elementFromPoint(10, 10, true, true); <div class="gb_0 gb_Ic gb_f gb_Hc gb_Lc" style="min-width: 297px;"> I haven't tested everything, presumably we have tests that test all of this, some of which might be failing.
Blake ran into this problem as well. It's a regression from bug 1052093. The code needs to look like this: let sbWidth = {__exposedProps__: {'value': 'rw'}}, sbHeight = {...same...}; gBrowser.tabs[0].linkedBrowser.contentDocumentAsCPOW.defaultView.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).getScrollbarSize(false, sbWidth, sbHeight); We probably need to figure out a way to fix this.
Presumably this affects anything with an out parameter, of which there are a few calls.
Blake, what do you think about the idea of having some special-case code in the CPOW set handler? It would detect if the property name is "value", if the object's proto is Object.prototype, and if the "value" property doesn't already exist. In that case it would bypass the COW.
Flags: needinfo?(mrbkap)
Assignee: nobody → bjacob
Assignee: bjacob → nobody
(In reply to PTO(back 9/9) Bill McCloskey (:billm) from comment #3) > Blake, what do you think about the idea of having some special-case code in > the CPOW set handler? It would detect if the property name is "value", if > the object's proto is Object.prototype, and if the "value" property doesn't > already exist. In that case it would bypass the COW. Is this still necessary with the change to which junk scope we use in the parent? If so, then it sounds OK to me for now but we really need to find a better solution.
Flags: needinfo?(mrbkap)
No longer blocks: 863512
Priority: -- → P3

Today the entire gBrowser.tabs[0].linkedBrowser.contentDocumentAsCPOW is undefined in the browser console. I assume this makes this bug invalid today, but feel free to re-open it or file a new one, of course.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID

Yes, CPOW support was removed a while ago.

You need to log in before you can comment on or make changes to this bug.