Closed Bug 570314 Opened 15 years ago Closed 15 years ago

[@ nsChildView::GetLayerManager] crashes embedders on launch

Categories

(Core :: Widget: Cocoa, defect)

All
macOS
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- final+

People

(Reporter: stuart.morgan+bugzilla, Assigned: mstange)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

(Copying from bug 561957, since this needs a bug tracking it) >+ nsCocoaWindow* window = GetXULWindowWidget(); >+ if (window->GetAcceleratedRendering() != mUseAcceleratedRendering) { Not all Gecko browsers are XUL-based; this code crashes Camino on launch. The return value of GetXULWindowWidget will always be null for embedding. I don't have enough context to know if an additional check is all that is required, or if there need to be deeper changes to make this embedding-friendly (it seems like latter though, otherwise mUseAcceleratedRendering will always be false, which is presumably not ideal).
Keywords: crash
Summary: nsChildView::GetLayerManager crashes embedders on launch → [@ nsChildView::GetLayerManager] crashes embedders on launch
Really? Almost an entire month that clearly incorrect code has been known to render Mac embedding of Gecko 1.9.3 completely impossible, and nobody cares at all? Josh, if nobody is going to fix this broken code, as module owner could you revert the change?
blocking2.0: --- → ?
Severity: critical → blocker
I don't see evidence that "nobody is going to", I just see that "nobody has yet". I'm sure Matt will happily add the null check as soon as he finds time. (In reply to comment #0) > (it seems like latter though, otherwise mUseAcceleratedRendering will always be > false, which is presumably not ideal). At the moment it's only true for full-screen video. How does / will that work in Camino? Also via a full-screen XUL window?
This should have been fixed as part of bug 572283 (part 2) Can you still reproduce the issue?
Hmm, that makes us return nsnull - shouldn't we return a BasicLayerManager, i.e. nsBaseWidget::GetLayerManager()? I think returning nsnull makes us crash in drawRect: mGeckoChild->GetLayerManager()->GetBackendType().
Assignee: nobody → mstange
blocking2.0: ? → final+
Attached patch Crash fixSplinter Review
Well spotted Marcus! This should be the correct behavior to prevent crashes. Embedders will still need their own way to set the accelerated flag on a window, but I think that can be a separate issue.
Attachment #458435 - Flags: review?(roc)
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Crash Signature: [@ nsChildView::GetLayerManager]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: