Explicitly remove CALayer from CARenderer when CARenderer is destroyed in order to avoid situations where the CALayer is attached to two renderers. b=556453 r=josh

This commit is contained in:
Benoit Girard 2010-04-05 00:29:56 -04:00
parent 7ee6b6c13e
commit 5ebd81adea

View File

@ -246,6 +246,10 @@ void cgdata_release_callback(void *aCGData, const void *data, size_t size) {
void nsCARenderer::Destroy() {
if (mCARenderer) {
CARenderer* caRenderer = (CARenderer*)mCARenderer;
// Bug 556453:
// Explicitly remove the layer from the renderer
// otherwise it does not always happen right away.
caRenderer.layer = NULL;
[caRenderer release];
}
if (mPixelBuffer) {