diff options
| author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-05-20 09:56:07 +0000 |
|---|---|---|
| committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-05-20 09:56:07 +0000 |
| commit | 41386e9cb918eed93b3f13648cbef387e371e451 (patch) | |
| tree | a97f9d7bd1d9d091833286085f72da9d83fd0606 /Source/JavaScriptCore/runtime/PropertyDescriptor.cpp | |
| parent | e15dd966d523731101f70ccf768bba12435a0208 (diff) | |
| download | WebKitGtk-tarball-41386e9cb918eed93b3f13648cbef387e371e451.tar.gz | |
webkitgtk-2.4.9webkitgtk-2.4.9
Diffstat (limited to 'Source/JavaScriptCore/runtime/PropertyDescriptor.cpp')
| -rw-r--r-- | Source/JavaScriptCore/runtime/PropertyDescriptor.cpp | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp b/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp index 5722e88da..1dd35605c 100644 --- a/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp +++ b/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp @@ -30,7 +30,7 @@ #include "GetterSetter.h" #include "JSObject.h" -#include "JSCInlines.h" +#include "Operations.h" namespace JSC { unsigned PropertyDescriptor::defaultAttributes = DontDelete | DontEnum | ReadOnly; @@ -106,8 +106,8 @@ void PropertyDescriptor::setDescriptor(JSValue value, unsigned attributes) m_attributes &= ~ReadOnly; // FIXME: we should be able to ASSERT this! GetterSetter* accessor = asGetterSetter(value); - m_getter = !accessor->isGetterNull() ? accessor->getter() : jsUndefined(); - m_setter = !accessor->isSetterNull() ? accessor->setter() : jsUndefined(); + m_getter = accessor->getter() ? accessor->getter() : jsUndefined(); + m_setter = accessor->setter() ? accessor->setter() : jsUndefined(); m_seenAttributes = EnumerablePresent | ConfigurablePresent; } else { m_value = value; @@ -115,24 +115,14 @@ void PropertyDescriptor::setDescriptor(JSValue value, unsigned attributes) } } -void PropertyDescriptor::setCustomDescriptor(unsigned attributes) -{ - m_attributes = attributes | Accessor | CustomAccessor; - m_attributes &= ~ReadOnly; - m_seenAttributes = EnumerablePresent | ConfigurablePresent; - setGetter(jsUndefined()); - setSetter(jsUndefined()); - m_value = JSValue(); -} - void PropertyDescriptor::setAccessorDescriptor(GetterSetter* accessor, unsigned attributes) { ASSERT(attributes & Accessor); attributes &= ~ReadOnly; // FIXME: we should be able to ASSERT this! m_attributes = attributes; - m_getter = !accessor->isGetterNull() ? accessor->getter() : jsUndefined(); - m_setter = !accessor->isSetterNull() ? accessor->setter() : jsUndefined(); + m_getter = accessor->getter() ? accessor->getter() : jsUndefined(); + m_setter = accessor->setter() ? accessor->setter() : jsUndefined(); m_seenAttributes = EnumerablePresent | ConfigurablePresent; } @@ -186,10 +176,8 @@ bool sameValue(ExecState* exec, JSValue a, JSValue b) return false; double x = a.asNumber(); double y = b.asNumber(); - bool xIsNaN = std::isnan(x); - bool yIsNaN = std::isnan(y); - if (xIsNaN || yIsNaN) - return xIsNaN && yIsNaN; + if (std::isnan(x)) + return std::isnan(y); return bitwise_cast<uint64_t>(x) == bitwise_cast<uint64_t>(y); } |
