Bug 1263275 - Avoid startup NS_ENSURE_TRUE(mTextInputHandler) failures in nsChildView.mm. r=mstange

MozReview-Commit-ID: 1cAMjmBJU2E

--HG--
extra : rebase_source : 977d22f70fa4d722f108e431f14c63be7118e3f6
This commit is contained in:
Jonathan Watt 2016-05-10 14:11:32 +01:00
parent 21bdcef9ca
commit ad0685ebf8

View File

@ -3275,6 +3275,15 @@ NSEvent* gLastDragMouseDownEvent = nil;
if (pluginContext) {
return pluginContext;
} else {
if (!mGeckoChild) {
// -[ChildView widgetDestroyed] has been called, but
// -[ChildView delayedTearDown] has not yet completed. Accessing
// [super inputContext] now would uselessly recreate a text input context
// for us, under which -[ChildView validAttributesForMarkedText] would
// be called and the assertion checking for mTextInputHandler would fail.
// We return nil to avoid that.
return nil;
}
return [super inputContext];
}
}