]> git.saurik.com Git - cycript.git/commitdiff
On ARM64, the isa instance variable is a tagged.
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 2 Jan 2014 06:47:01 +0000 (22:47 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 2 Jan 2014 06:47:01 +0000 (22:47 -0800)
ObjectiveC/Library.mm

index f495f33a13fca8ce09da82ba9e17dad63327207b..e234c160c4e9b8c18772568fb01503c42f04669d 100644 (file)
@@ -1969,6 +1969,11 @@ static JSValueRef Internal_getProperty(JSContextRef context, JSObjectRef object,
     id self(internal->GetValue());
     const char *name(CYPoolCString(pool, context, property));
 
+#ifdef __arm64__
+    if (strcmp(name, "isa") == 0)
+        return CYCastJSValue(context, object_getClass(self));
+#endif
+
     if (objc_ivar *ivar = object_getInstanceVariable(self, name, NULL)) {
         Type_privateData type(pool, ivar_getTypeEncoding(ivar));
         // XXX: if this fails and throws an exception the person we are throwing it to gets the wrong exception