mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Don't load class.js, it's the craziest code I've ever seen.
If we need stuff out of it, we can move it to a separate file.
This commit is contained in:
@@ -262,18 +262,20 @@ const JSClassDefinition kJSClassDefinitionEmpty = { 0, 0,
|
||||
|
||||
// Load class kit
|
||||
BOOL b;
|
||||
useJSLint = NO;
|
||||
id lintPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"jslint-jscocoa" ofType:@"js"];
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:lintPath]) {
|
||||
b = [self evalJSFile:lintPath];
|
||||
if (!b)
|
||||
NSLog(@"[JSCocoa initWithGlobalContext:] JSLint not loaded");
|
||||
}
|
||||
id classKitPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"class" ofType:@"js"];
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:classKitPath]) {
|
||||
b = [self evalJSFile:classKitPath];
|
||||
if (!b)
|
||||
NSLog(@"[JSCocoa initWithGlobalContext:] class.js not loaded");
|
||||
if (!ctx) {
|
||||
useJSLint = NO;
|
||||
id lintPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"jslint-jscocoa" ofType:@"js"];
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:lintPath]) {
|
||||
b = [self evalJSFile:lintPath];
|
||||
if (!b)
|
||||
NSLog(@"[JSCocoa initWithGlobalContext:] JSLint not loaded");
|
||||
}
|
||||
id classKitPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"class" ofType:@"js"];
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:classKitPath]) {
|
||||
b = [self evalJSFile:classKitPath];
|
||||
if (!b)
|
||||
NSLog(@"[JSCocoa initWithGlobalContext:] class.js not loaded");
|
||||
}
|
||||
}
|
||||
|
||||
// Objects can use their own dealloc, normally used up by JSCocoa
|
||||
|
||||
Reference in New Issue
Block a user