return exec->exception();
CallData callData;
- CallType callType = slot.m_data.getterFunc->getCallData(callData);
+ CallType callType = slot.m_getterFunc->getCallData(callData);
if (callType == CallTypeHost)
- return callData.native.function(exec, slot.m_data.getterFunc, slot.slotBase(), exec->emptyList());
+ return callData.native.function(exec, slot.m_getterFunc, slot.slotBase(), exec->emptyList());
Q_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());
+ return asFunction(slot.m_getterFunc)->call(exec, slot.slotBase(), exec->emptyList());
}
} // namespace JSC
class PropertySlot {
public:
PropertySlot()
+ : m_getterFunc(Q_NULLPTR),
+ m_valueSlot(Q_NULLPTR),
+ m_registerSlot(Q_NULLPTR)
{
clearBase();
clearOffset();
}
explicit PropertySlot(const JSValue base)
- : m_slotBase(base)
+ : m_slotBase(base),
+ m_getterFunc(Q_NULLPTR),
+ m_valueSlot(Q_NULLPTR),
+ m_registerSlot(Q_NULLPTR)
{
clearOffset();
clearValue();
JSValue getValue(ExecState* exec, const Identifier& propertyName) const
{
if (m_getValue == JSC_VALUE_SLOT_MARKER)
- return *m_data.valueSlot;
+ return *m_valueSlot;
if (m_getValue == JSC_REGISTER_SLOT_MARKER)
- return (*m_data.registerSlot).jsValue();
+ return (*m_registerSlot).jsValue();
return m_getValue(exec, propertyName, *this);
}
JSValue getValue(ExecState* exec, unsigned propertyName) const
{
if (m_getValue == JSC_VALUE_SLOT_MARKER)
- return *m_data.valueSlot;
+ return *m_valueSlot;
if (m_getValue == JSC_REGISTER_SLOT_MARKER)
- return (*m_data.registerSlot).jsValue();
+ return (*m_registerSlot).jsValue();
return m_getValue(exec, Identifier::from(exec, propertyName), *this);
}
clearBase();
clearOffset();
m_getValue = JSC_VALUE_SLOT_MARKER;
- m_data.valueSlot = valueSlot;
+ m_valueSlot = valueSlot;
}
void setValueSlot(JSValue slotBase, JSValue* valueSlot)
Q_ASSERT(valueSlot);
m_getValue = JSC_VALUE_SLOT_MARKER;
m_slotBase = slotBase;
- m_data.valueSlot = valueSlot;
+ m_valueSlot = valueSlot;
}
void setValueSlot(JSValue slotBase, JSValue* valueSlot, size_t offset)
Q_ASSERT(valueSlot);
m_getValue = JSC_VALUE_SLOT_MARKER;
m_slotBase = slotBase;
- m_data.valueSlot = valueSlot;
+ m_valueSlot = valueSlot;
m_offset = offset;
}
clearOffset();
m_getValue = JSC_VALUE_SLOT_MARKER;
m_value = value;
- m_data.valueSlot = &m_value;
+ m_valueSlot = &m_value;
}
void setRegisterSlot(Register* registerSlot)
clearBase();
clearOffset();
m_getValue = JSC_REGISTER_SLOT_MARKER;
- m_data.registerSlot = registerSlot;
+ m_registerSlot = registerSlot;
}
void setCustom(JSValue slotBase, GetValueFunc getValue)
Q_ASSERT(getValue);
m_getValue = getValue;
m_slotBase = slotBase;
- m_data.index = index;
+ m_index = index;
}
void setGetterSlot(JSObject* getterFunc)
{
Q_ASSERT(getterFunc);
m_getValue = functionGetter;
- m_data.getterFunc = getterFunc;
+ m_getterFunc = getterFunc;
}
void setUndefined()
m_offset = WTF::notFound;
}
- unsigned index() const { return m_data.index; }
+ unsigned index() const { return m_index; }
private:
static JSValue functionGetter(ExecState*, const Identifier&, const PropertySlot&);
GetValueFunc m_getValue;
JSValue m_slotBase;
- union {
- JSObject* getterFunc;
- JSValue* valueSlot;
- Register* registerSlot;
- unsigned index;
- } m_data;
-
JSValue m_value;
+ JSObject* m_getterFunc;
+ JSValue* m_valueSlot;
+ Register* m_registerSlot;
+ unsigned m_index;
+
size_t m_offset;
};
(Atom)event->xclient.data.l[0] == ATOM(_NET_WM_SYNC_REQUEST)) {
QWidget *w = QWidget::find(event->xany.window);
if (QTLWExtra *tlw = ((QETWidget*)w)->d_func()->maybeTopData()) {
- const ulong timestamp = (const ulong) event->xclient.data.l[1];
+ const Time timestamp = event->xclient.data.l[1];
if (timestamp > qt_x11Data->time)
qt_x11Data->time = timestamp;
if (timestamp == CurrentTime || timestamp > tlw->syncRequestTimestamp) {
}
#ifndef QT_NO_XSYNC
} else if (a == ATOM(_NET_WM_SYNC_REQUEST)) {
- const ulong timestamp = (const ulong) event->xclient.data.l[1];
+ const Time timestamp = event->xclient.data.l[1];
if (timestamp > qt_x11Data->time)
qt_x11Data->time = timestamp;
if (QTLWExtra *tlw = w->d_func()->maybeTopData()) {