Re: Privileged context features and JavaScript

On Fri, Apr 17, 2015 at 7:06 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 4/17/15 3:38 AM, Elliott Sprehn wrote:
>
>> It's preferable not to do that for us because you can then create a
>> static heap snapshot at compile time and memcpy to start JS contexts
>> faster.
>>
>
> For this specific case, where there are only two possibilities (privileged
> or not) it seems like you can just have two different snapshots and pick
> the right one.  I agree this uses more memory; there are all sorts of
> tradeoffs here.
>
> But yes, this is an argument against having any sort of dynamic behavior.
> In the case of Gecko, we have to have _something_ somewhat dynamic anyway,
> since we expose APIs to extensions that we don't expose to web pages...
> which I'm sure you do too.


In Blink, we don't include host objects in our snapshot anyway, so this
point is probably moot for web APIs. Or at least it's moot until more
things are self-hosted.

- Adam

Received on Friday, 17 April 2015 16:47:03 UTC