Closed Bug 755001 Opened 12 years ago Closed 12 years ago

Add "remote" attribute to <iframe mozbrowser>

Categories

(Core :: General, defect)

14 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)

References

Details

Attachments

(2 files)

We have OOP mozbrowser, but unfortunately we can't turn it on everywhere because some apps use APIs which don't work OOP (e.g. indexeddb).

cjones would like us to be able to selectively turn on OOP mozbrowser so we can roll it out gradually.
Attached patch Patch v1Splinter Review
No tests because whether a frame is OOP is intentionally difficult to detect!  I tested this manually.
Attachment #623824 - Flags: review?(bugs)
Assignee: nobody → justin.lebar+bug
I don't understand this.
We don't know beforehand if the page uses indexeddb.

What is the reason for this bug?
(In reply to Olli Pettay [:smaug] from comment #2)
> I don't understand this.
> We don't know beforehand if the page uses indexeddb.
> 
> What is the reason for this bug?

I assume this is for prototyping. We know in advance in Gaia so it will be possible to start using OOP iframe for some apps and debug possible problems while the work for OOP indexedDB is ongoing.
Exactly what Vivien said.  :)
Comment on attachment 623824 [details] [diff] [review]
Patch v1

Ok, but please fix the other bug I just filed ;)
Attachment #623824 - Flags: review?(bugs) → review+
Building now; I'll post the patch once I've tested it.  :)
Blocks: 755320
Sorry had to back the push out for failures in test_browserFrame7.html:
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=f177646e2aa2

{
3390 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/browser-frame/test_browserFrame7.html | top [object Window] != [object Window]
3391 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/browser-frame/test_browserFrame7.html | parent [object Window] != [object Window]
3392 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/browser-frame/test_browserFrame7.html | frameElement [object HTMLIFrameElement] != null
3393 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/browser-frame/test_browserFrame7.html | inner top [object Window] != [object Window]
}

https://hg.mozilla.org/integration/mozilla-inbound/rev/d124a9678e93
I broke my own test!  We were running everything in-process (in the tests), and browserFrame7 fails in-process.
Attachment #624105 - Flags: review?(bugs)
Attachment #624105 - Flags: review?(bugs) → review+
Please follow the tree rules when landing on inbound (posting a changeset link, setting target milestone, etc.)

http://hg.mozilla.org/integration/mozilla-inbound/rev/34778b6d15ed
https://hg.mozilla.org/mozilla-central/rev/34778b6d15ed
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
(In reply to Justin Lebar [:jlebar] from comment #0)
> We have OOP mozbrowser, but unfortunately we can't turn it on everywhere
> because some apps use APIs which don't work OOP (e.g. indexeddb).
> 
> cjones would like us to be able to selectively turn on OOP mozbrowser so we
> can roll it out gradually.

Whoa!  Pref-able is fine!  We don't want this decision under the control of web content.

I suggested making an <iframe mozapp> that simply mapped to remote=false for now, while leaving <iframe mozbrowser> mapped to whatever the pref says.

Can we do that in a followup?
I'm sorry I misunderstood you.

It would be nice to be able to run some apps OOP right now -- for example, we'd want to test OOP browser running OOP tabs.  So we could map mozbrowser to a pref and expose remote=? on mozapp, if you wanted.   mozbrowser is a more content-y thing than mozapp.

But I thought this whole thing was a temporary hack, and that everything was going to be OOP ASAP, so I think we may have better things to do atm than mess with this further.
(In reply to Justin Lebar [:jlebar] from comment #12)
> I'm sorry I misunderstood you.
> 

No worries!

> It would be nice to be able to run some apps OOP right now -- for example,
> we'd want to test OOP browser running OOP tabs.

We could do that by loading the browser app in an <iframe mozbrowser> with the OOP pref flipped on, no?

> But I thought this whole thing was a temporary hack, and that everything was
> going to be OOP ASAP, so I think we may have better things to do atm than
> mess with this further.

Temporary hack, fine, but we need to remove this.  Is there a bug filed?
> We could do that by loading the browser app in an <iframe mozbrowser> with the OOP pref flipped on, 
> no?

We could, except in the days since you've been gone, Mounir has been doing work on mozapp to make it actually different than mozbrowser.  The current state as of patches I've reviewed is that mozapps have manifests but we don't do anything with them.

But I don't think we can rely on being able to substitute mozbrowser for mozapp for much longer, if it even works now.

I have a bad track record with filing bugs to get around to sometime later, but I'll file a bug on backing this out and see if I have more success here.
Blocks: 756376
(In reply to Justin Lebar [:jlebar] from comment #14)
> > We could do that by loading the browser app in an <iframe mozbrowser> with the OOP pref flipped on, 
> > no?
> 
> We could, except in the days since you've been gone, Mounir has been doing
> work on mozapp to make it actually different than mozbrowser.

Huzzah!

> But I don't think we can rely on being able to substitute mozbrowser for
> mozapp for much longer, if it even works now.
> 

Absolutely.  When we get to that point, we should add an out-of-process mozapp pref.
Blocks: 772155
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: