Hi Devdatta,

Le 26/02/2013 03:03, Devdatta Akhawe a écrit :
Its also not time-invariant when document.domain is used, correct?
True. I guess the cases of "iframe initially has a different origin than its
parent, but JS can change that" are more numerous than I originally thought.
Other than document.domain, what changes effective principal without
navigation?
I thought changes to @sandbox, but Brian Smith proved me wrong, so I think that's it.

If I am not wrong, document.domain changes would mean that
"if you were a cross-origin frame, but changed  document.domain; then
cross-iframe access would be far more slower than if you had started
off being same-origin". I think that's fantastic and should be
considered a feature, not a bug. We want people to stop using
document.domain, right?  (postMessage)
From what I can imagine, the "slower" can come in 2 flavors (or maybe a mix of the two?): 1) effort to be made to merge the iframe content task into the parent content task. I feel it's more or less "just" about merging 2 event loops, but I'm probably missing some parts of the problem (that's partly why I shared the idea, waiting for feedback on that part) 2) Don't merge, but have the iframe script block on inter-task communication.

My gut-feeling is that 1) can be manageable (less than a second?) and it's a cost most pages using the document.domain trick will pay only once.
2) could be more problematic.
Promoting good practices cannot come at the price of making some existing web pages unusable and if 1) looks cheap enough from a very high-level point-of-view, 2) looks like it'd be inappropriate.

http://research.microsoft.com/en-us/um/people/helenw/papers/incoherencyAndWebAnalyzer.pdf
  suggests that it was already not common to use document.domain in
2009. It is hopefully less common now and will be even  less common by
the time Servo is ready. I just don't think we should consider
document.domain while guiding the design.
The paper you're linking to reveals that at the time of study, 1693/89222 crawled websites wrote on document.domain. window.postMessage was introduced in IE8. We can imagine that websites relying on the document.domain trick will still exist until IE6 and IE7 die and that's not for today [1] (people posted their IE stats less than a month ago). I don't think document.domain can be overlooked if we want Servo to be eventually used by people.

I'd be interested to see today's numbers.

Putting iframes from different origins into different tasks might also
help ease moving some critical iframes (like say for *.google.com) to
a new process, which was discussed on this list a fortnight ago.
I can't see the post on that. What is so critical about these iframes? Why the need for a new process? I feel task isolation can be enough.

David

[1] https://docs.google.com/spreadsheet/ccc?key=0At5NSTamYtYfdGJUSlhBZk1aT0VjaHhrdThkU1hidUE&usp=sharing#gid=0
_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to