diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
commit | 881da28418d380042aa95a97f0cbd42560a64f7c (patch) | |
tree | a794dff3274695e99c651902dde93d934ea7a5af /Source/JavaScriptCore/runtime/PropertySlot.cpp | |
parent | 7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff) | |
parent | 0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff) | |
download | qtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz |
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/JavaScriptCore/runtime/PropertySlot.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/PropertySlot.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/runtime/PropertySlot.cpp b/Source/JavaScriptCore/runtime/PropertySlot.cpp index 291ea487c..ad555c7cf 100644 --- a/Source/JavaScriptCore/runtime/PropertySlot.cpp +++ b/Source/JavaScriptCore/runtime/PropertySlot.cpp @@ -21,21 +21,22 @@ #include "config.h" #include "PropertySlot.h" -#include "JSFunction.h" -#include "JSGlobalObject.h" -#include "Operations.h" +#include "GetterSetter.h" +#include "JSCJSValueInlines.h" +#include "JSObject.h" namespace JSC { JSValue PropertySlot::functionGetter(ExecState* exec) const { - // Prevent getter functions from observing execution if an exception is pending. - if (exec->hadException()) - return exec->exception(); + ASSERT(m_thisValue); + return callGetter(exec, m_thisValue, m_data.getter.getterSetter); +} - CallData callData; - CallType callType = m_data.getterFunc->methodTable()->getCallData(m_data.getterFunc, callData); - return call(exec, m_data.getterFunc, callType, callData, m_thisValue.isObject() ? m_thisValue.toThisObject(exec) : m_thisValue, exec->emptyList()); +JSValue PropertySlot::customGetter(ExecState* exec, PropertyName propertyName) const +{ + JSValue thisValue = m_attributes & CustomAccessor ? m_thisValue : JSValue(slotBase()); + return JSValue::decode(m_data.custom.getValue(exec, JSValue::encode(thisValue), propertyName)); } } // namespace JSC |