1. 25 Oct, 2010 1 commit
  2. 12 Jul, 2010 1 commit
  3. 09 Mar, 2010 1 commit
    • kmillikin@chromium.org's avatar
      Small simplification of #include dependencies. · 3817a7ba
      kmillikin@chromium.org authored
      Remove messages.h from v8.h and include it explicitly in only the few places
      it is needed.  Many files relied on getting handles-inl.h implicitly from
      messages.h through v8.h, so include handles-inl.h explicitly in v8.h
      instead.
      
      Remove zone-inl.h from header files where it is not needed, can be replaced
      by a forward declaration, or can be replaced by zone.h (specifically,
      factory.h and heap.h).  Include zone.h or zone-inl.h in header files where
      it was implicitly included via heap.h or factory.h.  Prefer zone.h over
      zone-inl.h in header files where possible by including zone-inl.h in .cc
      files.
      
      Review URL: http://codereview.chromium.org/668248
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      3817a7ba
  4. 19 Aug, 2009 1 commit
  5. 25 May, 2009 1 commit
  6. 23 Jan, 2009 1 commit
  7. 04 Nov, 2008 1 commit
  8. 23 Oct, 2008 1 commit
  9. 21 Oct, 2008 1 commit
    • feng@chromium.org's avatar
      Split window support from V8. · 42ef2c3d
      feng@chromium.org authored
      Here is a description of the background and design of split window in Chrome and V8:
      https://docs.google.com/a/google.com/Doc?id=chhjkpg_47fwddxbfr
      
      This change list splits the window object into two parts: 1) an inner window object used as the global object of contexts; 2) an outer window object exposed to JavaScript and accessible by the name 'window'. Firefox did it awhile ago, here are some discussions: https://wiki.mozilla.org/Gecko:SplitWindow. One additional benefit of splitting window in Chrome is that accessing global variables don't need security checks anymore, it can improve applications that use many global variables.
      
      V8 support of split window:
        There are a small number of changes on V8 api to support split window:
      Security context is removed from V8, so does related API functions;
      A global object can be detached from its context and reused by a new context;
      Access checks on an object template can be turned on/off by default;
      An object can turn on its access checks later;
      
        V8 has a new object type, ApiGlobalObject, which is the outer window object type. The existing JSGlobalObject becomes the inner window object type. Security checks are moved from JSGlobalObject to ApiGlobalObject. ApiGlobalObject is the one exposed to JavaScript, it is accessible through Context::Global(). ApiGlobalObject's prototype is set to JSGlobalObject so that property lookups are forwarded to JSGlobalObject. ApiGlobalObject forwards all other property access requests to JSGlobalObject, such as SetProperty, DeleteProperty, etc.
      
        Security token is moved to a global context, and ApiGlobalObject has a reference to its global context. JSGlobalObject has a reference to its global context as well. When accessing properties on a global object in JavaScript, the domain security check is performed by comparing the security token of the lexical context (Top::global_context()) to the token of global object's context. The check is only needed when the receiver is a window object, such as 'window.document'. Accessing global variables, such as 'var foo = 3; foo' does not need checks because the receiver is the inner window object.
      
        When an outer window is detached from its global context (when a frame navigates away from a page), it is completely detached from the inner window. A new context is created for the new page, and the outer global object is reused. At this point, the access check on the DOMWindow wrapper of the old context is turned on. The code in old context is still able to access DOMWindow properties, but it has to go through domain security checks.
      
      
      It is debatable on how to implement the outer window object. Currently each property access function has to check if the receiver is ApiGlobalObject type. This approach might be error-prone that one may forget to check the receiver when adding new functions. It is unlikely a performance issue because accessing global variables are more common than 'window.foo' style coding.
      
      I am still working on the ARM port, and I'd like to hear comments and suggestions on the best way to support it in V8.
      
      
      Review URL: http://codereview.chromium.org/7366
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      42ef2c3d
  10. 11 Sep, 2008 1 commit
  11. 09 Sep, 2008 2 commits
  12. 03 Jul, 2008 1 commit