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

Side by Side Diff: Source/WebCore/bindings/dart/custom/DartIDBKeyCustom.cpp

Issue 10173006: Partial support to IDBKey to Dart conversions. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 8 years, 8 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011, Google Inc. 1 // Copyright 2011, Google Inc.
2 // All rights reserved. 2 // 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 if (Dart_IsList(handle)) { 56 if (Dart_IsList(handle)) {
57 // FIXME: Support Array case. 57 // FIXME: Support Array case.
58 exception = DART_UNIMPLEMENTED_EXCEPTION(); 58 exception = DART_UNIMPLEMENTED_EXCEPTION();
59 return 0; 59 return 0;
60 } 60 }
61 61
62 return IDBKey::createInvalid(); 62 return IDBKey::createInvalid();
63 } 63 }
64 64
65 Dart_Handle DartIDBKey::toDart(IDBKey*) 65 Dart_Handle DartIDBKey::toDart(IDBKey* key)
66 { 66 {
67 DART_UNIMPLEMENTED(); 67 if (!key)
68 return 0; 68 return Dart_Null();
69
70 switch (key->type()) {
71 case IDBKey::InvalidType:
72 case IDBKey::MinType:
73 ASSERT_NOT_REACHED();
74 return Dart_Null();
75 case IDBKey::NumberType:
76 return DartUtilities::doubleToDart(key->number());
77 case IDBKey::StringType:
78 return DartUtilities::stringToDart(key->string());
79 case IDBKey::DateType:
80 // FIXME: support Date.
81 return Dart_Null();
82 case IDBKey::ArrayType:
83 // FIXME: supprt Array.
podivilov 2012/04/25 11:06:16 typo: support
Anton Muhin 2012/04/25 13:16:57 Done.
84 return Dart_Null();
85 }
86
87 ASSERT_NOT_REACHED();
88 return Dart_Null();
69 } 89 }
70 90
71 } 91 }
72 92
73 #endif // ENABLE(INDEXED_DATABASE) 93 #endif // ENABLE(INDEXED_DATABASE)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698