X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63..2656c66b5b30d5597e842a751c7f19ad6c2fe31a:/runtime/PropertySlot.cpp diff --git a/runtime/PropertySlot.cpp b/runtime/PropertySlot.cpp index a0a2f48..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 Identifier&, const PropertySlot& slot) +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 = slot.m_data.getterFunc->getCallData(callData); - if (callType == CallTypeHost) - return callData.native.function(exec, slot.m_data.getterFunc, slot.slotBase(), exec->emptyList()); - ASSERT(callType == CallTypeJS); - // FIXME: Can this be done more efficiently using the callData? - return asFunction(slot.m_data.getterFunc)->call(exec, slot.slotBase(), exec->emptyList()); + ASSERT(m_thisValue); + return callGetter(exec, m_thisValue, m_data.getter.getterSetter); } } // namespace JSC