Closed Bug 663035 Opened 10 years ago Closed 10 years ago

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

Categories

(Core :: DOM: Navigation, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: Felipe, Assigned: Felipe)

Details

(Whiteboard: [e10s])

Attachments

(1 file)

Attached patch PatchSplinter Review
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+
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?
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.
http://hg.mozilla.org/mozilla-central/rev/258bc8fe5713
Status: ASSIGNED → RESOLVED
Closed: 10 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.