Fix build on Clang version 10

This commit is contained in:
Andrew Hyatt 2020-04-14 22:18:53 -04:00
parent 38b540ddd5
commit 2ce16ac953
2 changed files with 19 additions and 2 deletions

View File

@ -595,10 +595,10 @@ typedef std::pair<JSC::JSObject*, JSC::JSObject*> ConstructorPrototypePair;
});
if (!conformsToExportProtocol)
return m_classMap[cls] = [self classInfoForClass:class_getSuperclass(cls)];
return m_classMap[(id<NSCopying>)cls] = [self classInfoForClass:class_getSuperclass(cls)];
}
return m_classMap[cls] = [[[JSObjCClassInfo alloc] initForClass:cls] autorelease];
return m_classMap[(id<NSCopying>)cls] = [[[JSObjCClassInfo alloc] initForClass:cls] autorelease];
}
- (JSValue *)jsWrapperForObject:(id)object inContext:(JSContext *)context

17
clang10.patch Normal file
View File

@ -0,0 +1,17 @@
diff --git a/API/JSWrapperMap.mm b/API/JSWrapperMap.mm
index 8cce369..ef78ef1 100644
--- a/API/JSWrapperMap.mm
+++ b/API/JSWrapperMap.mm
@@ -595,10 +595,10 @@ typedef std::pair<JSC::JSObject*, JSC::JSObject*> ConstructorPrototypePair;
});
if (!conformsToExportProtocol)
- return m_classMap[cls] = [self classInfoForClass:class_getSuperclass(cls)];
+ return m_classMap[(id<NSCopying>)cls] = [self classInfoForClass:class_getSuperclass(cls)];
}
- return m_classMap[cls] = [[[JSObjCClassInfo alloc] initForClass:cls] autorelease];
+ return m_classMap[(id<NSCopying>)cls] = [[[JSObjCClassInfo alloc] initForClass:cls] autorelease];
}
- (JSValue *)jsWrapperForObject:(id)object inContext:(JSContext *)context