[webkit-changes] cvs commit: WebCore/kwq KWQKHTMLPart.mm

Tim tomernic at opensource.apple.com
Thu Dec 8 18:10:04 PST 2005


tomernic    05/12/08 18:10:03

  Modified:    .        ChangeLog
               kwq      KWQKHTMLPart.mm
  Log:
          Reviewed by Maciej.
  
  	<rdar://problem/4311703> Crash in NPN_Invoke receiving contents of http://www.woodieschilidogs.com/ in Mail.app
  
          * kwq/KWQKHTMLPart.mm:
          (KWQKHTMLPart::windowScriptNPObject):
          The window script object can be 0 if JavaScript is disabled.  However, callers (like plugins) expect us to
          always return a window script object here.  By substituting a plain ObjectImp for the window's ObjectImp,
          we can satisfy callers' assumptions and let them try to manipulate the dummy object when JavaScript is
          disabled.
  
  Revision  Changes    Path
  1.495     +13 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.494
  retrieving revision 1.495
  diff -u -r1.494 -r1.495
  --- ChangeLog	8 Dec 2005 22:22:46 -0000	1.494
  +++ ChangeLog	9 Dec 2005 02:09:57 -0000	1.495
  @@ -1,3 +1,16 @@
  +2005-12-08  Tim Omernick  <timo at apple.com>
  +
  +        Reviewed by Maciej.
  +
  +	<rdar://problem/4311703> Crash in NPN_Invoke receiving contents of http://www.woodieschilidogs.com/ in Mail.app
  +
  +        * kwq/KWQKHTMLPart.mm:
  +        (KWQKHTMLPart::windowScriptNPObject):
  +        The window script object can be 0 if JavaScript is disabled.  However, callers (like plugins) expect us to
  +        always return a window script object here.  By substituting a plain ObjectImp for the window's ObjectImp,
  +        we can satisfy callers' assumptions and let them try to manipulate the dummy object when JavaScript is
  +        disabled.
  +
   2005-12-08  David Harrison  <harrison at apple.com>
   
           Reviewed by Geoff.
  
  
  
  1.699     +10 -0     WebCore/kwq/KWQKHTMLPart.mm
  
  Index: KWQKHTMLPart.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.mm,v
  retrieving revision 1.698
  retrieving revision 1.699
  diff -u -r1.698 -r1.699
  --- KWQKHTMLPart.mm	8 Dec 2005 22:22:50 -0000	1.698
  +++ KWQKHTMLPart.mm	9 Dec 2005 02:10:02 -0000	1.699
  @@ -1441,6 +1441,16 @@
   {
       if (!_windowScriptNPObject) {
           KJS::ObjectImp *win = KJS::Window::retrieveWindow(this);
  +        
  +        // The window script object can be 0 if JavaScript is disabled.  However, callers (like plugins) expect us to
  +        // always return a window script object here.  By substituting a plain ObjectImp for the window's ObjectImp,
  +        // we can satisfy callers' assumptions and let them try to manipulate the dummy object when JavaScript is
  +        // disabled.
  +        if (!win) {
  +            JSLock lock;
  +            win = new KJS::ObjectImp();
  +        }
  +        
           _windowScriptNPObject = _NPN_CreateScriptObject (0, win, bindingRootObject(), bindingRootObject());
       }
   
  
  
  



More information about the webkit-changes mailing list