On Fri, Jul 13, 2012 at 4:36 PM, mschwartz <[email protected]> wrote:

> The possibilities I see for its use are to protect the global object from
> extraneous modification and tracking changes to the global object.


Would that not be applicable for the recent thread about how to "reset" the
global object for re-use?


> Another issue that comes up on this list from time to time is the ability
> to "reset" the global object between requests in a server-side HTTP
> scenario.  If you can track changes made during one request, you can undo
> them between requests.


That's what i get for not reading ahead before asking questions :/. Undo
might not always be feasible because changes could have side-effects which
the global object does not directly see. For example:

var foo = {}; // in global scope. Global knows about foo, but...

// in client code:

foo.bar = ...;

the global observer probably could not catch that and therefore not
generically revert it.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to