summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/PropertySlot.cpp
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-08-25 19:20:41 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:30:55 +0000
commit6882a04fb36642862b11efe514251d32070c3d65 (patch)
treeb7959826000b061fd5ccc7512035c7478742f7b0 /Source/JavaScriptCore/runtime/PropertySlot.cpp
parentab6df191029eeeb0b0f16f127d553265659f739e (diff)
downloadqtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/JavaScriptCore/runtime/PropertySlot.cpp')
-rw-r--r--Source/JavaScriptCore/runtime/PropertySlot.cpp19
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