Bug 659340: Add paranoia on frame life back in nsTextControlFrames. r=ehsan

This commit is contained in:
Randell Jesup 2011-05-30 01:29:32 -04:00
parent 540b2aefc4
commit 263db9515a

View File

@ -456,12 +456,13 @@ nsTextControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
initializer->Revoke();
}
initializer = new EditorInitializer(this);
Properties().Set(TextControlInitializer(),initializer);
if (!nsContentUtils::AddScriptRunner(initializer)) {
initializer->Revoke(); // paranoia
Properties().Delete(TextControlInitializer());
delete initializer;
return NS_ERROR_OUT_OF_MEMORY;
}
Properties().Set(TextControlInitializer(),initializer);
}
return NS_OK;