Mercurial > hg > icedtea7-forest > jdk
changeset 9099:3c911bfe30a9
8167356: Follow up fix for jdk8 backport of 8164143. Changes for CMenuComponent.m were missed
Reviewed-by: serb
author | mcherkas |
---|---|
date | Wed, 12 Oct 2016 18:45:23 +0300 |
parents | 7d4807d14247 |
children | 7348a8014d72 |
files | src/macosx/native/sun/awt/CMenuComponent.m |
diffstat | 1 files changed, 2 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/src/macosx/native/sun/awt/CMenuComponent.m Fri Nov 18 14:46:18 2016 +0300 +++ b/src/macosx/native/sun/awt/CMenuComponent.m Wed Oct 12 18:45:23 2016 +0300 @@ -41,45 +41,11 @@ return self; } --(void) cleanup { - // Used by subclasses -} - --(void) disposer { +-(void) dealloc { JNIEnv *env = [ThreadUtilities getJNIEnvUncached]; JNFDeleteGlobalRef(env, fPeer); fPeer = NULL; - [self cleanup]; - [self release]; + [super dealloc]; } - -// The method is used by all subclasses, since the process of the creation -// is the same. The only exception is the CMenuItem class. -- (void) _create_OnAppKitThread: (NSMutableArray *)argValue { - jobject cPeerObjGlobal = (jobject)[[argValue objectAtIndex: 0] pointerValue]; - CMenuItem *aCMenuItem = [self initWithPeer:cPeerObjGlobal]; - [argValue removeAllObjects]; - [argValue addObject: aCMenuItem]; -} - @end - -/* - * Class: sun_lwawt_macosx_CMenuComponent - * Method: nativeDispose - * Signature: (J)V - */ -JNIEXPORT void JNICALL -Java_sun_lwawt_macosx_CMenuComponent_nativeDispose -(JNIEnv *env, jobject peer, jlong menuItemObj) -{ -JNF_COCOA_ENTER(env); - - [ThreadUtilities performOnMainThread:@selector(disposer) - on:((id)jlong_to_ptr(menuItemObj)) - withObject:nil - waitUntilDone:NO]; - -JNF_COCOA_EXIT(env); -}