[webkit-changes] cvs commit: WebCore/khtml/ecma kjs_dom.cpp

Darin darin at opensource.apple.com
Thu Sep 22 12:19:57 PDT 2005


darin       05/09/22 12:19:57

  Modified:    .        ChangeLog
               khtml/ecma kjs_dom.cpp
  Log:
          Reviewed by Geoff.
  
          * khtml/ecma/kjs_dom.cpp: (KJS::getDOMDocumentNode): Don't use a static (global)
          identifier for the string "document" -- instead just create one each time.
          This eliminates the kjs_fast_malloc assertion on quit and does not create a
          significant performance regression because this is done at most once per JavaScript
          window object.
  
  Revision  Changes    Path
  1.146     +10 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.145
  retrieving revision 1.146
  diff -u -r1.145 -r1.146
  --- ChangeLog	21 Sep 2005 21:05:54 -0000	1.145
  +++ ChangeLog	22 Sep 2005 19:19:54 -0000	1.146
  @@ -1,3 +1,13 @@
  +2005-09-22  Darin Adler  <darin at apple.com>
  +
  +        Reviewed by Geoff.
  +
  +        * khtml/ecma/kjs_dom.cpp: (KJS::getDOMDocumentNode): Don't use a static (global)
  +        identifier for the string "document" -- instead just create one each time.
  +        This eliminates the kjs_fast_malloc assertion on quit and does not create a
  +        significant performance regression because this is done at most once per JavaScript
  +        window object.
  +
   2005-09-21  Vicki Murley  <vicki at apple.com>
   
           Changes by Romain Brestac, reviewed by Darin.
  
  
  
  1.97      +2 -4      WebCore/khtml/ecma/kjs_dom.cpp
  
  Index: kjs_dom.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/ecma/kjs_dom.cpp,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- kjs_dom.cpp	16 Sep 2005 22:42:04 -0000	1.96
  +++ kjs_dom.cpp	22 Sep 2005 19:19:56 -0000	1.97
  @@ -1616,10 +1616,8 @@
   
     // Make sure the document is kept around by the window object, and works right with the
     // back/forward cache.
  -  if (n->view()) {
  -    static Identifier documentIdentifier("document");
  -    Window::retrieveWindow(n->view()->part())->putDirect(documentIdentifier, ret, DontDelete|ReadOnly);
  -  }
  +  if (n->view())
  +    Window::retrieveWindow(n->view()->part())->putDirect("document", ret, DontDelete|ReadOnly);
   
     interp->putDOMObject(n, ret);
   
  
  
  



More information about the webkit-changes mailing list