Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23929] (6_0_X) Rename contextId to stop confusing Apple's private API scan #8400

Merged
merged 1 commit into from
Sep 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 5 additions & 8 deletions iphone/Classes/KrollContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
-(void)didStartNewContext:(KrollContext*)kroll;
-(void)willStopNewContext:(KrollContext*)kroll;
-(void)didStopNewContext:(KrollContext*)kroll;

@end

@interface KrollContext : NSObject
@interface KrollContext : NSObject
{
@private
id<KrollDelegate> delegate;
Expand All @@ -42,10 +42,10 @@
TiGlobalContextRef context;
NSMutableDictionary *timers;
void *debugger;

#ifdef TI_USE_KROLL_THREAD
NSRecursiveLock *timerLock;
NSString *contextId;
NSString *krollContextId;
NSRecursiveLock *lock;
NSCondition *condition;
NSMutableArray *queue;
Expand Down Expand Up @@ -86,7 +86,7 @@

-(int)forceGarbageCollectNow;
#ifdef TI_USE_KROLL_THREAD
-(NSString*)contextId;
-(NSString*)krollContextId;
-(NSString*)threadName;
#endif
@end
Expand Down Expand Up @@ -179,6 +179,3 @@ KrollContext* GetKrollContext(TiContextRef context);
@property(nonatomic,readwrite,retain) id invocationArg4;

@end



10 changes: 5 additions & 5 deletions iphone/Classes/KrollContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ +(void)initialize
#ifdef TI_USE_KROLL_THREAD
-(NSString*)threadName
{
return [NSString stringWithFormat:@"KrollContext<%@>",contextId];
return [NSString stringWithFormat:@"KrollContext<%@>",krollContextId];
}
#endif
-(id)init
Expand All @@ -826,7 +826,7 @@ -(id)init
NSLog(@"[DEBUG] INIT: %@",self);
#endif
#ifdef TI_USE_KROLL_THREAD
contextId = [[NSString stringWithFormat:@"kroll$%d",++KrollContextIdCounter] copy];
krollContextId = [[NSString stringWithFormat:@"kroll$%d",++KrollContextIdCounter] copy];
condition = [[NSCondition alloc] init];
queue = [[NSMutableArray alloc] init];
lock = [[NSRecursiveLock alloc] init];
Expand Down Expand Up @@ -861,7 +861,7 @@ -(void)destroy
[queue removeAllObjects];
}
RELEASE_TO_NIL(queue);
RELEASE_TO_NIL(contextId);
RELEASE_TO_NIL(krollContextId);
RELEASE_TO_NIL(lock);
if (timerLock!=nil)
{
Expand Down Expand Up @@ -914,9 +914,9 @@ -(void)dealloc
}

#ifdef TI_USE_KROLL_THREAD
-(NSString*)contextId
-(NSString*)krollContextId
{
return [[contextId retain] autorelease];
return [[krollContextId retain] autorelease];
}
#endif
-(void)registerTimer:(id)timer timerId:(double)timerId
Expand Down