Exemple #1
0
JSValue jsStorageEventStorageArea(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSStorageEvent* castedThis = static_cast<JSStorageEvent*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    StorageEvent* imp = static_cast<StorageEvent*>(castedThis->impl());
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->storageArea()));
    return result;
}
void InspectorDOMStorageResource::handleEvent(ScriptExecutionContext*, Event* event)
{
    ASSERT(m_frontend);
    ASSERT(eventNames().storageEvent == event->type());
    StorageEvent* storageEvent = static_cast<StorageEvent*>(event);
    Storage* storage = storageEvent->storageArea();
    ExceptionCode ec = 0;
    bool isLocalStorage = (storage->frame()->domWindow()->localStorage(ec) == storage && !ec);
    if (isSameHostAndType(storage->frame(), isLocalStorage))
        m_frontend->updateDOMStorage(m_id);
}