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

Side by Side Diff: WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp

Issue 5800002: Merge 73697 - 2010-12-10 Hans Wennborg <hans@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 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
« no previous file with comments | « WebCore/bindings/v8/IDBBindingUtilities.cpp ('k') | WebCore/storage/IDBFactoryBackendImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
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
(...skipping 27 matching lines...) Expand all
38 38
39 v8::Handle<v8::Value> toV8(IDBKey* key) 39 v8::Handle<v8::Value> toV8(IDBKey* key)
40 { 40 {
41 if (!key) 41 if (!key)
42 return v8::Null(); 42 return v8::Null();
43 43
44 switch (key->type()) { 44 switch (key->type()) {
45 case IDBKey::NullType: 45 case IDBKey::NullType:
46 return v8::Null(); 46 return v8::Null();
47 case IDBKey::NumberType: 47 case IDBKey::NumberType:
48 return v8::Integer::New(key->number()); 48 return v8::Number::New(key->number());
49 case IDBKey::StringType: 49 case IDBKey::StringType:
50 return v8String(key->string()); 50 return v8String(key->string());
51 // FIXME: Implement dates. 51 // FIXME: Implement dates.
52 } 52 }
53 53
54 ASSERT_NOT_REACHED(); 54 ASSERT_NOT_REACHED();
55 return v8::Undefined(); 55 return v8::Undefined();
56 } 56 }
57 57
58 #endif // ENABLE(INDEXED_DATABASE) 58 #endif // ENABLE(INDEXED_DATABASE)
59 59
60 } // namespace WebCore 60 } // namespace WebCore
OLDNEW
« no previous file with comments | « WebCore/bindings/v8/IDBBindingUtilities.cpp ('k') | WebCore/storage/IDBFactoryBackendImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698