Changeset 44749 in webkit for trunk/WebCore/loader/CachedScript.h


Ignore:
Timestamp:
Jun 16, 2009, 5:38:53 PM (16 years ago)
Author:
Antti Koivisto
Message:

2009-06-16 Antti Koivisto <Antti Koivisto>

Reviewed by Brady Eidson.

<rdar://problem/6660037> CrashTracer: [USER] 46 crashes in Safari at com.apple.WebCore • WebCore::CachedCSSStyleSheet::addClient + 53


When revalidating a resource, calling addClient() on one client might cause another to get removed.


  • made CachedResource::addClient() non-virtual and added virtual didAddClient()
  • in CachedResource::switchClientsToRevalidatedResource() add all clients to the client set of the revalidated resource first
  • check if the client is still in the set before invoking didAddClient() for it


No test case, I didn't manage to construct one. You need some combination of 304 revalidation, stylesheets that
reference each other via @imports and reloading.

  • WebCore.base.exp:
  • loader/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::didAddClient):
  • loader/CachedCSSStyleSheet.h:
  • loader/CachedFont.cpp: (WebCore::CachedFont::didAddClient):
  • loader/CachedFont.h:
  • loader/CachedImage.cpp: (WebCore::CachedImage::didAddClient):
  • loader/CachedImage.h:
  • loader/CachedResource.cpp: (WebCore::CachedResource::addClient): (WebCore::CachedResource::addClientToSet): (WebCore::CachedResource::switchClientsToRevalidatedResource):
  • loader/CachedResource.h:
  • loader/CachedScript.cpp: (WebCore::CachedScript::didAddClient):
  • loader/CachedScript.h:
  • loader/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::didAddClient):
  • loader/CachedXSLStyleSheet.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/loader/CachedScript.h

    r41551 r44749  
    4242        const String& script();
    4343
    44         virtual void addClient(CachedResourceClient*);
     44        virtual void didAddClient(CachedResourceClient*);
    4545        virtual void allClientsRemoved();
    4646
Note: See TracChangeset for help on using the changeset viewer.