diff options
Diffstat (limited to 'Source/WebCore/bindings/js/IDBBindingUtilities.h')
-rw-r--r-- | Source/WebCore/bindings/js/IDBBindingUtilities.h | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/Source/WebCore/bindings/js/IDBBindingUtilities.h b/Source/WebCore/bindings/js/IDBBindingUtilities.h index f012aef2d..c491fee7f 100644 --- a/Source/WebCore/bindings/js/IDBBindingUtilities.h +++ b/Source/WebCore/bindings/js/IDBBindingUtilities.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2010 Google Inc. All rights reserved. + * Copyright (C) 2014, 2015, 2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,34 +24,41 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef IDBBindingUtilities_h -#define IDBBindingUtilities_h +#pragma once #if ENABLE(INDEXED_DATABASE) -#include "Dictionary.h" -#include <bindings/ScriptValue.h> +#include "IDBKeyPath.h" #include <wtf/Forward.h> +namespace JSC { +class ExecState; +class JSGlobalObject; +class JSValue; +} + namespace WebCore { -class DOMRequestState; +class IDBIndexInfo; class IDBKey; -class IDBKeyPath; -class SharedBuffer; +class IDBKeyData; +class IDBValue; +class IndexKey; +class JSDOMGlobalObject; + +RefPtr<IDBKey> maybeCreateIDBKeyFromScriptValueAndKeyPath(JSC::ExecState&, const JSC::JSValue&, const IDBKeyPath&); +bool canInjectIDBKeyIntoScriptValue(JSC::ExecState&, const JSC::JSValue&, const IDBKeyPath&); +bool injectIDBKeyIntoScriptValue(JSC::ExecState&, const IDBKeyData&, JSC::JSValue, const IDBKeyPath&); -IDBKeyPath idbKeyPathFromValue(JSC::ExecState*, JSC::JSValue); +void generateIndexKeyForValue(JSC::ExecState&, const IDBIndexInfo&, JSC::JSValue, IndexKey& outKey); -bool injectIDBKeyIntoScriptValue(DOMRequestState*, PassRefPtr<IDBKey>, Deprecated::ScriptValue&, const IDBKeyPath&); -PassRefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(DOMRequestState*, const Deprecated::ScriptValue&, const IDBKeyPath&); -bool canInjectIDBKeyIntoScriptValue(DOMRequestState*, const Deprecated::ScriptValue&, const IDBKeyPath&); -Deprecated::ScriptValue deserializeIDBValue(DOMRequestState*, PassRefPtr<SerializedScriptValue>); -Deprecated::ScriptValue deserializeIDBValueBuffer(DOMRequestState*, PassRefPtr<SharedBuffer>); -Deprecated::ScriptValue idbKeyToScriptValue(DOMRequestState*, PassRefPtr<IDBKey>); -PassRefPtr<IDBKey> scriptValueToIDBKey(DOMRequestState*, const Deprecated::ScriptValue&); +Ref<IDBKey> scriptValueToIDBKey(JSC::ExecState&, const JSC::JSValue&); + +JSC::JSValue deserializeIDBValueToJSValue(JSC::ExecState&, const IDBValue&); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const IDBValue&); +JSC::JSValue toJS(JSC::ExecState&, JSC::JSGlobalObject&, IDBKey*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const IDBKeyData&); } #endif // ENABLE(INDEXED_DATABASE) - -#endif // IDBBindingUtilities_h |