diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/bindings/js/IDBBindingUtilities.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
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 |