| 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 return v8::Null(isolate); | 410 return v8::Null(isolate); |
| 411 | 411 |
| 412 v8::Local<v8::Value> v8Value = deserializeIDBValueData(isolate, value); | 412 v8::Local<v8::Value> v8Value = deserializeIDBValueData(isolate, value); |
| 413 if (value->primaryKey()) { | 413 if (value->primaryKey()) { |
| 414 v8::Local<v8::Value> key = | 414 v8::Local<v8::Value> key = |
| 415 toV8(value->primaryKey(), creationContext, isolate); | 415 toV8(value->primaryKey(), creationContext, isolate); |
| 416 if (key.IsEmpty()) | 416 if (key.IsEmpty()) |
| 417 return v8::Local<v8::Value>(); | 417 return v8::Local<v8::Value>(); |
| 418 bool injected = | 418 bool injected = |
| 419 injectV8KeyIntoV8Value(isolate, key, v8Value, value->keyPath()); | 419 injectV8KeyIntoV8Value(isolate, key, v8Value, value->keyPath()); |
| 420 ASSERT_UNUSED(injected, injected); | 420 DCHECK(injected); |
| 421 } | 421 } |
| 422 | 422 |
| 423 return v8Value; | 423 return v8Value; |
| 424 } | 424 } |
| 425 | 425 |
| 426 static v8::Local<v8::Value> deserializeIDBValueArray( | 426 static v8::Local<v8::Value> deserializeIDBValueArray( |
| 427 v8::Isolate* isolate, | 427 v8::Isolate* isolate, |
| 428 v8::Local<v8::Object> creationContext, | 428 v8::Local<v8::Object> creationContext, |
| 429 const Vector<RefPtr<IDBValue>>* values) { | 429 const Vector<RefPtr<IDBValue>>* values) { |
| 430 ASSERT(isolate->InContext()); | 430 ASSERT(isolate->InContext()); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 TrackExceptionState exceptionState; | 612 TrackExceptionState exceptionState; |
| 613 IDBKey* expectedKey = createIDBKeyFromValueAndKeyPath( | 613 IDBKey* expectedKey = createIDBKeyFromValueAndKeyPath( |
| 614 isolate, scriptValue.v8Value(), value->keyPath(), exceptionState, | 614 isolate, scriptValue.v8Value(), value->keyPath(), exceptionState, |
| 615 allowExperimentalTypes); | 615 allowExperimentalTypes); |
| 616 ASSERT(!exceptionState.hadException()); | 616 ASSERT(!exceptionState.hadException()); |
| 617 if (expectedKey && expectedKey->isEqual(value->primaryKey())) | 617 if (expectedKey && expectedKey->isEqual(value->primaryKey())) |
| 618 return; | 618 return; |
| 619 | 619 |
| 620 bool injected = injectV8KeyIntoV8Value( | 620 bool injected = injectV8KeyIntoV8Value( |
| 621 isolate, keyValue.v8Value(), scriptValue.v8Value(), value->keyPath()); | 621 isolate, keyValue.v8Value(), scriptValue.v8Value(), value->keyPath()); |
| 622 ASSERT_UNUSED(injected, injected); | 622 DCHECK(injected); |
| 623 } | 623 } |
| 624 #endif | 624 #endif |
| 625 | 625 |
| 626 } // namespace blink | 626 } // namespace blink |
| OLD | NEW |