summaryrefslogtreecommitdiff
path: root/ext/installfiles/mac/mac-ui-macgap1-wrapper/src/MacGap/Classes/Commands/Command.m
blob: 39b85630a401b14093ca6bbc8bf117add6babb3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
//  Command.m
//  MacGap
//
//  Created by Joe Hildebrand on 1/10/12.
//  Copyright (c) 2012 Twitter. All rights reserved.
//

#import "Command.h"
#import <JavaScriptCore/JSContextRef.h>

@implementation Command 

- (id) initWithContext:(JSContextRef)aContext {
    self = [super init];
    if (!self)
        return nil;
    context = aContext;
    JSGlobalContextRetain((JSGlobalContextRef)context);
    return self;
}

- (void)dealloc
{
    if (context)
        JSGlobalContextRelease((JSGlobalContextRef)context);
}
@end