From: Jay Freeman (saurik) Date: Thu, 2 Jan 2014 06:47:01 +0000 (-0800) Subject: On ARM64, the isa instance variable is a tagged. X-Git-Tag: v0.9.500~110 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/db69c1f7d93a630b98677dfd3c06cb0e534750ed?hp=a1f3555e04644c0445200cff08b0470f614de48b On ARM64, the isa instance variable is a tagged. --- diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index f495f33..e234c16 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -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