- From: Jonas Sicking <jonas@sicking.cc>
- Date: Sun, 5 May 2013 17:37:38 -0700
- To: Anne van Kesteren <annevk@annevk.nl>
- Cc: Eric U <ericu@google.com>, Arun Ranganathan <arun@mozilla.com>, Web Applications Working Group WG <public-webapps@w3.org>
On Fri, May 3, 2013 at 6:55 AM, Anne van Kesteren <annevk@annevk.nl> wrote: > On Thu, May 2, 2013 at 12:53 AM, Jonas Sicking <jonas@sicking.cc> wrote: >> It actually has turned out to be surprisingly easy in Gecko. But I >> realize the same might not be true everywhere. > > Can we have a description of this (and how it does not run into the > problems Glenn mentioned). I feel that I have an incomplete > understanding of what actually happens at the moment. > > img.src = url What we do is that we 1. Resolve the URL against the current base URL 2. Perform some security checks 3. Kick off a network fetch 4. Return Note that no actual network activity happens here. That is all being done on background threads. But what we do in step 3 is to send the signal to the network code that it should start doing all the stuff that it needs to do. Step 3 is where we inserted the code to grab a reference to the Blob such that it doesn't matter if the URL is revoked. Some of this code will change. For example I'd like to move towards doing the security checks asynchronously. Essentially by making them part of the "the stuff that the network code needs to do". But I we'll always need to fire off that algorithm from the main thread, and generally doing that synchronously is the simplest solution. / Jonas
Received on Monday, 6 May 2013 00:38:37 UTC