From: Jay Freeman (saurik) Date: Sun, 10 Jan 2016 23:18:01 +0000 (-0800) Subject: Try to push kJSClassAttributeNoAutomaticPrototype. X-Git-Tag: v0.9.590~4 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/45bc27ef837b88ddabbf6f944c6176d995a56ecf?ds=sidebyside Try to push kJSClassAttributeNoAutomaticPrototype. --- diff --git a/Execute.cpp b/Execute.cpp index 81bd6ec..b2397d8 100644 --- a/Execute.cpp +++ b/Execute.cpp @@ -2132,6 +2132,7 @@ void CYInitializeDynamic() { JSClassDefinition definition; definition = kJSClassDefinitionEmpty; + definition.attributes = kJSClassAttributeNoAutomaticPrototype; definition.className = "All"; definition.staticFunctions = All_staticFunctions; definition.hasProperty = &All_hasProperty; @@ -2140,6 +2141,7 @@ void CYInitializeDynamic() { All_ = JSClassCreate(&definition); definition = kJSClassDefinitionEmpty; + definition.attributes = kJSClassAttributeNoAutomaticPrototype; definition.className = "Context"; definition.finalize = &CYFinalize; CYPrivate::Class_ = JSClassCreate(&definition); diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index f583601..eed19e3 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -2848,6 +2848,7 @@ void CYObjectiveC_Initialize() { /*XXX*/ JSContextRef context(NULL); CYPoolTry { CYPrivate::Class_ = JSClassCreate(&definition); definition = kJSClassDefinitionEmpty; + definition.attributes = kJSClassAttributeNoAutomaticPrototype; definition.className = "Interior"; definition.staticFunctions = Interior_staticFunctions; definition.hasProperty = &Interior_hasProperty; @@ -2880,11 +2881,13 @@ void CYObjectiveC_Initialize() { /*XXX*/ JSContextRef context(NULL); CYPoolTry { CYPrivate::Class_ = JSClassCreate(&definition); definition = kJSClassDefinitionEmpty; + definition.attributes = kJSClassAttributeNoAutomaticPrototype; definition.className = "Super"; definition.finalize = &CYFinalize; CYPrivate::Class_ = JSClassCreate(&definition); definition = kJSClassDefinitionEmpty; + definition.attributes = kJSClassAttributeNoAutomaticPrototype; definition.className = "ObjectiveC::Classes"; definition.hasProperty = &ObjectiveC_Classes_hasProperty; definition.getProperty = &ObjectiveC_Classes_getProperty; @@ -2892,6 +2895,7 @@ void CYObjectiveC_Initialize() { /*XXX*/ JSContextRef context(NULL); CYPoolTry { ObjectiveC_Classes_ = JSClassCreate(&definition); definition = kJSClassDefinitionEmpty; + definition.attributes = kJSClassAttributeNoAutomaticPrototype; definition.className = "ObjectiveC::Constants"; definition.getProperty = &ObjectiveC_Constants_getProperty; definition.getPropertyNames = &ObjectiveC_Constants_getPropertyNames; @@ -2899,12 +2903,14 @@ void CYObjectiveC_Initialize() { /*XXX*/ JSContextRef context(NULL); CYPoolTry { #ifdef __APPLE__ definition = kJSClassDefinitionEmpty; + definition.attributes = kJSClassAttributeNoAutomaticPrototype; definition.className = "ObjectiveC::Images"; definition.getProperty = &ObjectiveC_Images_getProperty; definition.getPropertyNames = &ObjectiveC_Images_getPropertyNames; ObjectiveC_Images_ = JSClassCreate(&definition); definition = kJSClassDefinitionEmpty; + definition.attributes = kJSClassAttributeNoAutomaticPrototype; definition.className = "ObjectiveC::Image::Classes"; definition.getProperty = &ObjectiveC_Image_Classes_getProperty; definition.getPropertyNames = &ObjectiveC_Image_Classes_getPropertyNames; @@ -2912,6 +2918,7 @@ void CYObjectiveC_Initialize() { /*XXX*/ JSContextRef context(NULL); CYPoolTry { #endif definition = kJSClassDefinitionEmpty; + definition.attributes = kJSClassAttributeNoAutomaticPrototype; definition.className = "ObjectiveC::Protocols"; definition.getProperty = &ObjectiveC_Protocols_getProperty; definition.getPropertyNames = &ObjectiveC_Protocols_getPropertyNames;