| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |