aboutsummaryrefslogtreecommitdiff
path: root/Foundation
diff options
context:
space:
mode:
authorGravatar Thomas Van Lenten <thomasvl@google.com>2016-04-29 13:51:31 -0400
committerGravatar Thomas Van Lenten <thomasvl@google.com>2016-04-29 13:51:31 -0400
commit7331352a30da15c92f942d07ed1a1a7db8e61250 (patch)
treef1b0df239232010b987b75eb1c3b940c95e499d8 /Foundation
parent91fdd6d09d6390b67ff3258b6418437dca11d6e1 (diff)
Update GTMDebugThreadValidation with general queue support.
Diffstat (limited to 'Foundation')
-rw-r--r--Foundation/GTMNSAppleScript+Handler.m15
1 files changed, 7 insertions, 8 deletions
diff --git a/Foundation/GTMNSAppleScript+Handler.m b/Foundation/GTMNSAppleScript+Handler.m
index e17ba91..850de58 100644
--- a/Foundation/GTMNSAppleScript+Handler.m
+++ b/Foundation/GTMNSAppleScript+Handler.m
@@ -22,7 +22,6 @@
#import "GTMNSAppleEventDescriptor+Handler.h"
#import "GTMFourCharCode.h"
#import "GTMMethodCheck.h"
-#import "GTMDebugThreadValidation.h"
// Keys for passing AppleScript calls from other threads to the main thread
// and back through gtm_internalExecuteAppleEvent:
@@ -326,7 +325,7 @@ GTM_METHOD_CHECK(NSAppleEventDescriptor, gtm_registerSelector:forTypes:count:);
}
- (NSAppleEventDescriptor*)gtm_valueDescriptorForProperty:(id)property {
- GTMAssertRunningOnMainThread();
+ _GTMDevAssert([NSThread isMainThread], @"Requires main thread.");
OSAError error = paramErr;
NSAppleEventDescriptor *desc = nil;
NSAppleEventDescriptor *propertyName
@@ -377,7 +376,7 @@ GTM_METHOD_CHECK(NSAppleEventDescriptor, gtm_registerSelector:forTypes:count:);
}
- (NSSet*)gtm_scriptHandlers {
- GTMAssertRunningOnMainThread();
+ _GTMDevAssert([NSThread isMainThread], @"Requires main thread.");
AEDescList names = { typeNull, NULL };
NSArray *array = nil;
ComponentInstance component = NULL;
@@ -396,7 +395,7 @@ GTM_METHOD_CHECK(NSAppleEventDescriptor, gtm_registerSelector:forTypes:count:);
}
- (NSSet*)gtm_scriptProperties {
- GTMAssertRunningOnMainThread();
+ _GTMDevAssert([NSThread isMainThread], @"Requires main thread.");
AEDescList names = { typeNull, NULL };
NSArray *array = nil;
ComponentInstance component = NULL;
@@ -415,7 +414,7 @@ GTM_METHOD_CHECK(NSAppleEventDescriptor, gtm_registerSelector:forTypes:count:);
}
- (OSAID)gtm_genericID:(OSAID)osaID forComponent:(ComponentInstance)component {
- GTMAssertRunningOnMainThread();
+ _GTMDevAssert([NSThread isMainThread], @"Requires main thread.");
ComponentInstance genericComponent = [NSAppleScript _defaultScriptingComponent];
OSAID exactID = osaID;
OSAError error = OSARealToGenericID(genericComponent, &exactID, component);
@@ -428,7 +427,7 @@ GTM_METHOD_CHECK(NSAppleEventDescriptor, gtm_registerSelector:forTypes:count:);
- (NSAppleEventDescriptor*)descForScriptID:(OSAID)osaID
component:(ComponentInstance)component {
- GTMAssertRunningOnMainThread();
+ _GTMDevAssert([NSThread isMainThread], @"Requires main thread.");
NSAppleEventDescriptor *desc = nil;
// If we have a script, return a typeGTMOSAID, otherwise convert it to
// it's default AEDesc using OSACoerceToDesc with typeWildCard.
@@ -468,7 +467,7 @@ GTM_METHOD_CHECK(NSAppleEventDescriptor, gtm_registerSelector:forTypes:count:);
}
- (OSAID)gtm_realIDAndComponent:(ComponentInstance*)component {
- GTMAssertRunningOnMainThread();
+ _GTMDevAssert([NSThread isMainThread], @"Requires main thread.");
if (![self isCompiled]) {
NSDictionary *error;
if (![self compileAndReturnError:&error]) {
@@ -487,7 +486,7 @@ GTM_METHOD_CHECK(NSAppleEventDescriptor, gtm_registerSelector:forTypes:count:);
}
- (void)gtm_internalExecuteAppleEvent:(NSMutableDictionary *)data {
- GTMAssertRunningOnMainThread();
+ _GTMDevAssert([NSThread isMainThread], @"Requires main thread.");
NSDictionary *error = nil;
if (![self isCompiled]) {
[self compileAndReturnError:&error];