As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact bugzilla-admin@mozilla.org
Last Comment Bug 663035 - Retrieving docShell of remote frames should simply return null instead of throwing
: Retrieving docShell of remote frames should simply return null instead of thr...
Status: RESOLVED FIXED
[e10s]
:
Product: Core
Classification: Components
Component: Document Navigation (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: mozilla8
Assigned To: :Felipe Gomes (needinfo me!)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-08 23:03 PDT by :Felipe Gomes (needinfo me!)
Modified: 2011-07-08 13:11 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (1.21 KB, patch)
2011-06-08 23:03 PDT, :Felipe Gomes (needinfo me!)
benjamin: review+
Details | Diff | Splinter Review

Description User image :Felipe Gomes (needinfo me!) 2011-06-08 23:03:55 PDT
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.
Comment 1 User image Benjamin Smedberg [:bsmedberg] 2011-06-09 10:03:02 PDT
You prefer this instead of if (!browser.isRemote) { use browser.docShell }? I slightly prefer that way, but not enough to object here.
Comment 2 User image :Felipe Gomes (needinfo me!) 2011-06-09 16:09:09 PDT
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?
Comment 3 User image :Felipe Gomes (needinfo me!) 2011-06-14 20:58:44 PDT
http://hg.mozilla.org/projects/electrolysis/rev/767e8a39d70b
Comment 4 User image Marco Bonardo [::mak] 2011-07-01 07:49:47 PDT
I backed out everything from central since Android and Maemo were unhappy about the push these changes were part of.
Comment 5 User image :Felipe Gomes (needinfo me!) 2011-07-08 13:11:13 PDT
http://hg.mozilla.org/mozilla-central/rev/258bc8fe5713

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