Skip to content

Commit

Permalink
8235151: Nonexistent notifyQuit method referred from iOS GlassHelper.m
Browse files Browse the repository at this point in the history
Reviewed-by: jvos
  • Loading branch information
Jose Pereda authored and Johan Vos committed Dec 4, 2019
1 parent 98035cb commit 2d4096a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ - (void)callQuit
GET_MAIN_JENV;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
{
(*env)->CallVoidMethod(env, self.jApplication, [GlassHelper ApplicationNotifyQuitMethod]);
(*env)->CallVoidMethod(env, self.jApplication, [GlassHelper ApplicationNotifyWillQuitMethod]);
}
[pool drain];
GLASS_CHECK_EXCEPTION(env);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
+ (jmethodID)ApplicationNotifyDidBecomeActiveMethod;
+ (jmethodID)ApplicationNotifyWillResignActiveMethod;
+ (jmethodID)ApplicationNotifyDidResignActiveMethod;
+ (jmethodID)ApplicationNotifyQuitMethod;
+ (jmethodID)ApplicationNotifyWillQuitMethod;
+ (jmethodID)ApplicationNotifyDidReceiveMemoryWarningMethod;

@end
14 changes: 7 additions & 7 deletions modules/javafx.graphics/src/main/native-glass/ios/GlassHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,20 +223,20 @@ + (jmethodID)ApplicationNotifyDidReceiveMemoryWarningMethod
}


+ (jmethodID)ApplicationNotifyQuitMethod
+ (jmethodID)ApplicationNotifyWillQuitMethod
{
static jmethodID _ApplicationNotifyQuitMethod = NULL;
if (_ApplicationNotifyQuitMethod == NULL)
static jmethodID _ApplicationNotifyWillQuitMethod = NULL;
if (_ApplicationNotifyWillQuitMethod == NULL)
{
GET_MAIN_JENV;
_ApplicationNotifyQuitMethod = (*env)->GetMethodID(env, [GlassHelper ApplicationClass], "notifyQuit", "()V");
_ApplicationNotifyWillQuitMethod = (*env)->GetMethodID(env, [GlassHelper ApplicationClass], "notifyWillQuit", "()V");
GLASS_CHECK_EXCEPTION(env);
}
if (_ApplicationNotifyQuitMethod == NULL)
if (_ApplicationNotifyWillQuitMethod == NULL)
{
NSLog(@"GlassHelper error: _ApplicationNotifyQuitMethod == NULL");
NSLog(@"GlassHelper error: _ApplicationNotifyWillQuitMethod == NULL");
}
return _ApplicationNotifyQuitMethod;
return _ApplicationNotifyWillQuitMethod;
}


Expand Down

0 comments on commit 2d4096a

Please sign in to comment.