The default bug view has changed. See this FAQ.

Retrieving docShell of remote frames should simply return null instead of throwing

RESOLVED FIXED in mozilla8

Status

()

Core
Document Navigation
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Felipe, Assigned: Felipe)

Tracking

Trunk
mozilla8
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [e10s])

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 538179 [details] [diff] [review]
Patch

Retrieving docShell of remote frames should simply return null instead of throwing, otherwise code like "if (browser.docShell) .." can't be written.

I'm keeping the warning msg for now because it's been pretty useful to find breakage, but we should also remove it later.
Attachment #538179 - Flags: review?(benjamin)
You prefer this instead of if (!browser.isRemote) { use browser.docShell }? I slightly prefer that way, but not enough to object here.
Attachment #538179 - Flags: review?(benjamin) → review+
(Assignee)

Comment 2

6 years ago
I do intend to keep this usage to a minimum.. but having a property that throws is a little unconventional. with the patch I don't have to ifdef out code like this:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#1522

Also, I was thinking of:
  <property name="isRemote" onget="return this.docShell == null"/>

because checking the attribute might give wrong results (if it was force disabled)

Or is there a better way to check that?
(Assignee)

Comment 3

6 years ago
http://hg.mozilla.org/projects/electrolysis/rev/767e8a39d70b
Whiteboard: [e10s] → [e10s][landed in e10s]
I backed out everything from central since Android and Maemo were unhappy about the push these changes were part of.
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/mozilla-central/rev/258bc8fe5713
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [e10s][landed in e10s] → [e10s]
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.