Bug 1528600 - widget/cocoa: Remove empty function EnsureLogInitialized(). r=mstange
authorChris Peterson <cpeterson@mozilla.com>
Sun, 17 Feb 2019 16:10:57 +0000
changeset 459728 b255d130f71827cdf6610b6a64785ac8ead11219
parent 459727 134db05991c2728632f29b392ba6eb400776e50d
child 459729 90be1db1879c748ac5efa17942386853447febad
push id35570
push usercsabou@mozilla.com
push dateMon, 18 Feb 2019 15:51:41 +0000
treeherdermozilla-central@4a53bea7d587 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1528600
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1528600 - widget/cocoa: Remove empty function EnsureLogInitialized(). r=mstange widget/cocoa/nsChildView.mm:249:6 [-Wmissing-prototypes] no previous prototype for function 'EnsureLogInitialized' Depends on D20087 Differential Revision: https://phabricator.services.mozilla.com/D20088
widget/cocoa/nsChildView.mm
widget/cocoa/nsClipboard.mm
widget/cocoa/nsDragService.mm
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -246,18 +246,16 @@ static NSMutableDictionary* sNativeKeyEv
 #pragma mark -
 
 // Flips a screen coordinate from a point in the cocoa coordinate system (bottom-left rect) to a
 // point that is a "flipped" cocoa coordinate system (starts in the top-left).
 static inline void FlipCocoaScreenCoordinate(NSPoint& inPoint) {
   inPoint.y = nsCocoaUtils::FlippedScreenY(inPoint.y);
 }
 
-void EnsureLogInitialized() {}
-
 namespace {
 
 // Used for OpenGL drawing from the compositor thread for OMTC BasicLayers.
 // We need to use OpenGL for this because there seems to be no other robust
 // way of drawing from a secondary thread without locking, which would cause
 // deadlocks in our setup. See bug 882523.
 class GLPresenter : public GLManager {
  public:
@@ -332,17 +330,16 @@ nsChildView::nsChildView()
       mIsOpaque(false),
       mTitlebarCGContext(nullptr),
       mBackingScaleFactor(0.0),
       mVisible(false),
       mDrawing(false),
       mIsDispatchPaint(false),
       mPluginFocused{false},
       mCurrentPanGestureBelongsToSwipe{false} {
-  EnsureLogInitialized();
 }
 
 nsChildView::~nsChildView() {
   ReleaseTitlebarCGContext();
 
   if (mSwipeTracker) {
     mSwipeTracker->Destroy();
     mSwipeTracker = nullptr;
--- a/widget/cocoa/nsClipboard.mm
+++ b/widget/cocoa/nsClipboard.mm
@@ -25,18 +25,16 @@
 #include "nsCocoaUtils.h"
 
 using mozilla::gfx::DataSourceSurface;
 using mozilla::gfx::SourceSurface;
 using mozilla::LogLevel;
 
 extern mozilla::LazyLogModule sCocoaLog;
 
-extern void EnsureLogInitialized();
-
 mozilla::StaticRefPtr<nsITransferable> nsClipboard::sSelectionCache;
 
 @implementation UTIHelper
 
 + (NSString*)stringFromPboardType:(NSString*)aType {
   if ([aType isEqualToString:kMozWildcardPboardType] ||
       [aType isEqualToString:kMozCustomTypesPboardType] ||
       [aType isEqualToString:kPublicUrlPboardType] ||
@@ -57,17 +55,16 @@ mozilla::StaticRefPtr<nsITransferable> n
   [dynamicType release];
   return result;
 }
 
 @end  // UTIHelper
 
 nsClipboard::nsClipboard()
     : mCachedClipboard(-1), mChangeCount(0), mIgnoreEmptyNotification(false) {
-  EnsureLogInitialized();
 }
 
 nsClipboard::~nsClipboard() {
   EmptyClipboard(kGlobalClipboard);
   EmptyClipboard(kFindClipboard);
   ClearSelectionCache();
 }
 
--- a/widget/cocoa/nsDragService.mm
+++ b/widget/cocoa/nsDragService.mm
@@ -31,18 +31,16 @@
 #include "gfxPlatform.h"
 #include "nsDeviceContext.h"
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 
 extern mozilla::LazyLogModule sCocoaLog;
 
-extern void EnsureLogInitialized();
-
 extern NSPasteboard* globalDragPboard;
 extern ChildView* gLastDragView;
 extern NSEvent* gLastDragMouseDownEvent;
 extern bool gUserCancelledDrag;
 
 // This global makes the transferable array available to Cocoa's promised
 // file destination callback.
 nsIArray* gDraggedTransferables = nullptr;
@@ -51,17 +49,16 @@ NSString* const kPublicUrlPboardType = @
 NSString* const kPublicUrlNamePboardType = @"public.url-name";
 NSString* const kUrlsWithTitlesPboardType = @"WebURLsWithTitlesPboardType";
 NSString* const kMozWildcardPboardType = @"org.mozilla.MozillaWildcard";
 NSString* const kMozCustomTypesPboardType = @"org.mozilla.custom-clipdata";
 NSString* const kMozFileUrlsPboardType = @"org.mozilla.file-urls";
 
 nsDragService::nsDragService()
     : mNativeDragView(nil), mNativeDragEvent(nil), mDragImageChanged(false) {
-  EnsureLogInitialized();
 }
 
 nsDragService::~nsDragService() {}
 
 NSImage* nsDragService::ConstructDragImage(nsINode* aDOMNode, const Maybe<CSSIntRegion>& aRegion,
                                            NSPoint* aDragPoint) {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;