X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/4e4e5a6f2694187498445a6ac6f1634ce8141119..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/runtime/PropertySlot.cpp diff --git a/runtime/PropertySlot.cpp b/runtime/PropertySlot.cpp index 2306a11..c949f4b 100644 --- a/runtime/PropertySlot.cpp +++ b/runtime/PropertySlot.cpp @@ -21,24 +21,15 @@ #include "config.h" #include "PropertySlot.h" -#include "JSFunction.h" -#include "JSGlobalObject.h" +#include "GetterSetter.h" +#include "JSCJSValueInlines.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(); - - CallData callData; - CallType callType = m_data.getterFunc->getCallData(callData); - if (callType == CallTypeHost) - return callData.native.function(exec, m_data.getterFunc, thisValue(), exec->emptyList()); - ASSERT(callType == CallTypeJS); - // FIXME: Can this be done more efficiently using the callData? - return asFunction(m_data.getterFunc)->call(exec, thisValue(), exec->emptyList()); + ASSERT(m_thisValue); + return callGetter(exec, m_thisValue, m_data.getter.getterSetter); } } // namespace JSC