зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1348424 - Grab a reference to the window when swapping out its background color. r=spohl, a=dveditz
MozReview-Commit-ID: HS1AYyxfMWS --HG-- extra : rebase_source : cad2cfae25d746a240d9c98cc61fc824f60d2e0e
This commit is contained in:
Родитель
c39ae07ad1
Коммит
b2a8c14305
|
@ -2980,7 +2980,7 @@ public:
|
|||
explicit AutoBackgroundSetter(NSView* aView) {
|
||||
if (nsCocoaFeatures::OnElCapitanOrLater() &&
|
||||
[[aView window] isKindOfClass:[ToolbarWindow class]]) {
|
||||
mWindow = (ToolbarWindow*)[aView window];
|
||||
mWindow = [(ToolbarWindow*)[aView window] retain];
|
||||
[mWindow setTemporaryBackgroundColor];
|
||||
} else {
|
||||
mWindow = nullptr;
|
||||
|
@ -2990,11 +2990,12 @@ public:
|
|||
~AutoBackgroundSetter() {
|
||||
if (mWindow) {
|
||||
[mWindow restoreBackgroundColor];
|
||||
[mWindow release];
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
ToolbarWindow* mWindow;
|
||||
ToolbarWindow* mWindow; // strong
|
||||
};
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче