Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: Source/bindings/v8/custom/V8IDBAnyCustom.cpp

Issue 18590006: Blob support for IDB [Blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: small cleanup Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
jsbell 2013/12/20 19:13:54 Be prepared for some rebase fun - this file has go
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer 11 * copyright notice, this list of conditions and the following disclaimer
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return toV8(impl->idbDatabase(), creationContext, isolate); 80 return toV8(impl->idbDatabase(), creationContext, isolate);
81 case IDBAny::IDBFactoryType: 81 case IDBAny::IDBFactoryType:
82 return toV8(impl->idbFactory(), creationContext, isolate); 82 return toV8(impl->idbFactory(), creationContext, isolate);
83 case IDBAny::IDBIndexType: 83 case IDBAny::IDBIndexType:
84 return toV8(impl->idbIndex(), creationContext, isolate); 84 return toV8(impl->idbIndex(), creationContext, isolate);
85 case IDBAny::IDBObjectStoreType: 85 case IDBAny::IDBObjectStoreType:
86 return toV8(impl->idbObjectStore(), creationContext, isolate); 86 return toV8(impl->idbObjectStore(), creationContext, isolate);
87 case IDBAny::IDBTransactionType: 87 case IDBAny::IDBTransactionType:
88 return toV8(impl->idbTransaction(), creationContext, isolate); 88 return toV8(impl->idbTransaction(), creationContext, isolate);
89 case IDBAny::BufferType: 89 case IDBAny::BufferType:
90 return deserializeIDBValueBuffer(impl->buffer(), isolate); 90 return deserializeIDBValueBuffer(impl->buffer(), impl->blobInfo(), isola te);
91 case IDBAny::StringType: 91 case IDBAny::StringType:
92 return v8String(impl->string(), isolate); 92 return v8String(impl->string(), isolate);
93 case IDBAny::IntegerType: 93 case IDBAny::IntegerType:
94 return v8::Number::New(isolate, impl->integer()); 94 return v8::Number::New(isolate, impl->integer());
95 case IDBAny::KeyType: 95 case IDBAny::KeyType:
96 return toV8(impl->key(), creationContext, isolate); 96 return toV8(impl->key(), creationContext, isolate);
97 case IDBAny::KeyPathType: 97 case IDBAny::KeyPathType:
98 return toV8(impl->keyPath(), creationContext, isolate); 98 return toV8(impl->keyPath(), creationContext, isolate);
99 case IDBAny::BufferKeyAndKeyPathType: { 99 case IDBAny::BufferKeyAndKeyPathType: {
100 v8::Handle<v8::Value> value = deserializeIDBValueBuffer(impl->buffer(), isolate); 100 v8::Handle<v8::Value> value = deserializeIDBValueBuffer(impl->buffer(), impl->blobInfo(), isolate);
101 v8::Handle<v8::Value> key = toV8(impl->key(), creationContext, isolate); 101 v8::Handle<v8::Value> key = toV8(impl->key(), creationContext, isolate);
102 bool injected = injectV8KeyIntoV8Value(key, value, impl->keyPath(), isol ate); 102 bool injected = injectV8KeyIntoV8Value(key, value, impl->keyPath(), isol ate);
103 ASSERT_UNUSED(injected, injected); 103 ASSERT_UNUSED(injected, injected);
104 return value; 104 return value;
105 } 105 }
106 } 106 }
107 107
108 ASSERT_NOT_REACHED(); 108 ASSERT_NOT_REACHED();
109 return v8::Undefined(isolate); 109 return v8::Undefined(isolate);
110 } 110 }
111 111
112 } // namespace WebCore 112 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698