kdelibs/khtml/ecma

David Hyatt hyatt at apple.com
Wed Oct 1 12:32:10 CEST 2003


The code is already inside an if (window->m_part) clause.  I also 
assumed that a document couldn't fire a timeout after it went away, 
since the timer will presumably have been canceled.

dave

On Sep 30, 2003, at 4:17 PM, Dirk Mueller wrote:

> On Tuesday 30 September 2003 21:02, David Faure wrote:
>
>> +
>> +        // Update our document's rendering following the execution 
>> of the
>> timeout callback. +        DOM::DocumentImpl *doc =
>> static_cast<DOM::DocumentImpl*>(window->m_part->document().handle()); 
>> +
>>    doc->updateRendering();
>>        }
>>      }
>
> This code misses null checks for window->m_part and 
> document().handle() -> as
> this is called from a QTimer timeout this code is rather dangerous.
>
> BTW, it would be a lot cleaner to use Document::updateRendering() now 
> that we
> have it.
>
>
> -- 
>> Looking for a KDE-related EMail-Alias ? Get one at kdemail.net for 
>> FREE! <
> _______________________________________________
> Khtml-devel at mail.kde.org
> http://mail.kde.org/mailman/listinfo/khtml-devel



More information about the Khtml-devel mailing list