PassRefPtr<IDBKey> createIDBKeyFromValue(JSC::ExecState* exec, JSC::JSValue value) { if (value.isNull()) return IDBKey::create(); if (value.isInt32()) return IDBKey::create(value.toInt32(exec)); if (value.isString()) return IDBKey::create(ustringToString(value.toString(exec))); // FIXME: Implement dates. return 0; }
void JSUint8Array::indexSetter(JSC::ExecState* exec, unsigned index, JSC::JSValue value) { impl()->set(index, static_cast<unsigned char>(value.toInt32(exec))); }
void JSInt16Array::indexSetter(JSC::ExecState* exec, unsigned index, JSC::JSValue value) { impl()->set(index, static_cast<signed short>(value.toInt32(exec))); }