On Thu, Jan 19, 2017 at 3:58 AM, <joc...@chromium.org> wrote: > Hey, > > a bunch of questions: > > how will you handle synchronous scripting between that process and other > frames from the same origin that aren't in that dedicated process? >
If there are other toplevel windows within the loading window's unit of related browsing contexts, the Large-Allocation header will be ignored, and a message will be printed to the console. There was no other easy way which was in scope for the timeline of this project which didn't cause web-visible side effects. In an earlier version of the design, we considered severing these synchronous connections but we decided on making the smaller web-compatible change of simply ignoring the header in these problematic edge cases. > Will it be possible for an iframe to send this header? What will happen > then? > This header is ignored when it is seen while loading an iframe, like above. > What will happen if a site requests a large allocation, but then runs out > of address space/memory before it needs the allocation? > The current implementation of Large-Header ignores the size property of the header. Instead, it always creates a new process, and loads the page into it, performing no pre-allocation. We were originally planning to support pre-allocation, but after testing we determined that simply allocating a new process without the pre-allocation would be sufficient to greatly improve allocation success rates. In the future, we may decide to support pre-allocation. The design we were considering would have involved allocating this memory at startup and providing it to our JS engine. When a large allocation would be made that reserved memory would be provided instead, with the remaining memory returned to the OS. We would also have a timer attached to the memory, as well as a memory pressure listener, which if either of these events triggered before the memory had been claimed, would free the allocation back to the OS. When the website is done using the allocation, it would be returned to the OS like usual. > Will you somehow notify the site if you failed to allocate the requested > memory? > The site will notice that it failed to allocate the requested memory when it requests the memory, and the allocation fails. We don't provide any other mechanism for notifying the website programmatically about Large-Allocation status. > After the first wasm program was run, will you return the memory? Will it > stay reserved for future wasm programs on the same page? > See the above 2 answers. > > best > -jochen > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform