| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 static v8::Handle<v8::Value> deserializeIDBValueBuffer(v8::Isolate*, SharedBuffe
r*, const Vector<blink::WebBlobInfo>*); | 56 static v8::Handle<v8::Value> deserializeIDBValueBuffer(v8::Isolate*, SharedBuffe
r*, const Vector<blink::WebBlobInfo>*); |
| 57 | 57 |
| 58 static v8::Handle<v8::Value> toV8(const IDBKeyPath& value, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 58 static v8::Handle<v8::Value> toV8(const IDBKeyPath& value, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
| 59 { | 59 { |
| 60 switch (value.type()) { | 60 switch (value.type()) { |
| 61 case IDBKeyPath::NullType: | 61 case IDBKeyPath::NullType: |
| 62 return v8::Null(isolate); | 62 return v8::Null(isolate); |
| 63 case IDBKeyPath::StringType: | 63 case IDBKeyPath::StringType: |
| 64 return v8String(isolate, value.string()); | 64 return v8String(isolate, value.string()); |
| 65 case IDBKeyPath::ArrayType: | 65 case IDBKeyPath::ArrayType: |
| 66 RefPtr<DOMStringList> keyPaths = DOMStringList::create(); | 66 RefPtrWillBeRawPtr<DOMStringList> keyPaths = DOMStringList::create(); |
| 67 for (Vector<String>::const_iterator it = value.array().begin(); it != va
lue.array().end(); ++it) | 67 for (Vector<String>::const_iterator it = value.array().begin(); it != va
lue.array().end(); ++it) |
| 68 keyPaths->append(*it); | 68 keyPaths->append(*it); |
| 69 return toV8(keyPaths.release(), creationContext, isolate); | 69 return toV8(keyPaths.release(), creationContext, isolate); |
| 70 } | 70 } |
| 71 ASSERT_NOT_REACHED(); | 71 ASSERT_NOT_REACHED(); |
| 72 return v8::Undefined(isolate); | 72 return v8::Undefined(isolate); |
| 73 } | 73 } |
| 74 | 74 |
| 75 static v8::Handle<v8::Value> toV8(const IDBKey* key, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 75 static v8::Handle<v8::Value> toV8(const IDBKey* key, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
| 76 { | 76 { |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 const bool allowExperimentalTypes = true; | 445 const bool allowExperimentalTypes = true; |
| 446 RefPtrWillBeRawPtr<IDBKey> expectedKey = createIDBKeyFromScriptValueAndKeyPa
thInternal(isolate, scriptValue, keyPath, allowExperimentalTypes); | 446 RefPtrWillBeRawPtr<IDBKey> expectedKey = createIDBKeyFromScriptValueAndKeyPa
thInternal(isolate, scriptValue, keyPath, allowExperimentalTypes); |
| 447 ASSERT(!expectedKey || expectedKey->isEqual(key.get())); | 447 ASSERT(!expectedKey || expectedKey->isEqual(key.get())); |
| 448 | 448 |
| 449 bool injected = injectV8KeyIntoV8Value(isolate, keyValue.v8Value(), scriptVa
lue.v8Value(), keyPath); | 449 bool injected = injectV8KeyIntoV8Value(isolate, keyValue.v8Value(), scriptVa
lue.v8Value(), keyPath); |
| 450 ASSERT_UNUSED(injected, injected); | 450 ASSERT_UNUSED(injected, injected); |
| 451 } | 451 } |
| 452 #endif | 452 #endif |
| 453 | 453 |
| 454 } // namespace WebCore | 454 } // namespace WebCore |
| OLD | NEW |