Skip to content

Commit

Permalink
fix(ios): explicitly flush KrollPromises created internally and not e…
Browse files Browse the repository at this point in the history
…xposed to JS
  • Loading branch information
sgtcoolguy committed Jan 26, 2021
1 parent 2704ec2 commit 528a79c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion iphone/Classes/TiUINavigationWindowProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ - (void)cleanNavStack
TiWindowProxy *win = (TiWindowProxy *)[(TiViewController *)viewController proxy];
[win setTab:nil];
[win setParentOrientationController:nil];
[win close:nil];
[[win close:nil] flush];
}
// Remove navigation controller from parent controller
[navController willMoveToParentViewController:nil];
Expand Down
2 changes: 1 addition & 1 deletion iphone/Classes/TiUITabProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ - (void)closeWindowProxy:(TiWindowProxy *)window animated:(BOOL)animated
// for this to work right, we need to sure that we always have the tab close the window
// and not let the window simply close by itself. this will ensure that we tell the
// tab that we're doing that
[window close:nil]; // FIXME: How can we take the returned Promise and basically forward it's reject/resolve along?
[[window close:nil] flush]; // FIXME: How can we take the returned Promise and basically forward it's reject/resolve along?
RELEASE_TO_NIL_AUTORELEASE(window);
RELEASE_TO_NIL(windowController);
}
Expand Down
2 changes: 1 addition & 1 deletion iphone/TitaniumKit/TitaniumKit/Sources/API/TiWindowProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ - (void)openOnUIThread:(NSArray *)args
} else {
args = [NSArray arrayWithObject:self];
}
[tab openWindow:args];
[[tab openWindow:args] flush]; // TODO: release?
} else if (isModal) {
UIViewController *theController = [self hostingController];
[self windowWillOpen];
Expand Down

0 comments on commit 528a79c

Please sign in to comment.