Bug 1102304 - Fix crash in 32 bit mode on 10.10 by correcting the _addKnownSubview signature. r=smichaud
authorMarkus Stange <mstange@themasta.com>
Thu, 20 Nov 2014 13:23:41 -0500
changeset 216685 f39fc9dc4c0d8a3565116a1b4e6852f80f9a397c
parent 216684 163a9cee54368cb51dc395783518b6ca0c42f55c
child 216686 ff8c07f86822e54335838081fb728ffb32e12192
push id27858
push userkwierso@gmail.com
push dateFri, 21 Nov 2014 01:35:46 +0000
treeherdermozilla-central@6309710dd71d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud
bugs1102304
milestone36.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 1102304 - Fix crash in 32 bit mode on 10.10 by correcting the _addKnownSubview signature. r=smichaud This just copies the definition for the documented -[NSView addSubview:positioned:relativeTo:] method, which is the exact counterpart of this (undocumented) method. Using "long long" for the positioned: argument was wrong - the real type is NSWindowOrderingMode, which is typedefed to NSInteger, which is pointer-sized and thus doesn't match long long on 32 bit.
widget/cocoa/nsCocoaWindow.mm
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -2578,17 +2578,17 @@ static NSMutableSet *gSwizzledFrameViewC
 @interface NSWindow(PrivateSetNeedsDisplayInRectMethod)
  - (void)_setNeedsDisplayInRect:(NSRect)aRect;
 @end
 
 // This method is on NSThemeFrame starting with 10.10, but since NSThemeFrame
 // is not a public class, we declare the method on NSView instead. We only have
 // this declaration in order to avoid compiler warnings.
 @interface NSView(PrivateAddKnownSubviewMethod)
- - (void)_addKnownSubview:(id)arg1 positioned:(long long)arg2 relativeTo:(id)arg3;
+ - (void)_addKnownSubview:(NSView*)aView positioned:(NSWindowOrderingMode)place relativeTo:(NSView*)otherView;
 @end
 
 @interface BaseWindow(Private)
 - (void)removeTrackingArea;
 - (void)cursorUpdated:(NSEvent*)aEvent;
 - (void)updateContentViewSize;
 - (void)reflowTitlebarElements;
 @end