X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/6fe7ccc865dc7d7541b93c5bcaf6368d2c98a174..40a37d088818fc2fbeba2ef850dbcaaf294befbf:/runtime/PropertyDescriptor.h diff --git a/runtime/PropertyDescriptor.h b/runtime/PropertyDescriptor.h index 2c3878f..df74d9e 100644 --- a/runtime/PropertyDescriptor.h +++ b/runtime/PropertyDescriptor.h @@ -26,7 +26,7 @@ #ifndef PropertyDescriptor_h #define PropertyDescriptor_h -#include "JSValue.h" +#include "JSCJSValue.h" namespace JSC { class GetterSetter; @@ -41,6 +41,15 @@ namespace JSC { , m_seenAttributes(0) { } + PropertyDescriptor(JSValue value, unsigned attributes) + : m_value(value) + , m_attributes(attributes) + , m_seenAttributes(EnumerablePresent | ConfigurablePresent | WritablePresent) + { + ASSERT(m_value); + ASSERT(!m_value.isGetterSetter()); + ASSERT(!m_value.isCustomGetterSetter()); + } JS_EXPORT_PRIVATE bool writable() const; JS_EXPORT_PRIVATE bool enumerable() const; JS_EXPORT_PRIVATE bool configurable() const; @@ -55,7 +64,8 @@ namespace JSC { JSObject* setterObject() const; JS_EXPORT_PRIVATE void setUndefined(); JS_EXPORT_PRIVATE void setDescriptor(JSValue value, unsigned attributes); - void setAccessorDescriptor(GetterSetter* accessor, unsigned attributes); + JS_EXPORT_PRIVATE void setCustomDescriptor(unsigned attributes); + JS_EXPORT_PRIVATE void setAccessorDescriptor(GetterSetter* accessor, unsigned attributes); JS_EXPORT_PRIVATE void setWritable(bool); JS_EXPORT_PRIVATE void setEnumerable(bool); JS_EXPORT_PRIVATE void setConfigurable(bool);