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 | 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 if (m_pendingCursor) { | 318 if (m_pendingCursor) { |
319 // Value should be null, signifying the end of the cursor's range. | 319 // Value should be null, signifying the end of the cursor's range. |
320 ASSERT(value->isNull()); | 320 ASSERT(value->isNull()); |
321 ASSERT(!value->blobInfo()->size()); | 321 ASSERT(!value->blobInfo()->size()); |
322 m_pendingCursor->close(); | 322 m_pendingCursor->close(); |
323 m_pendingCursor.clear(); | 323 m_pendingCursor.clear(); |
324 } | 324 } |
325 | 325 |
326 #if ENABLE(ASSERT) | 326 #if ENABLE(ASSERT) |
327 if (value->primaryKey()) { | 327 if (value->primaryKey()) { |
328 ASSERT(value->keyPath() == effectiveObjectStore(m_source)->metadata().ke
yPath); | 328 DCHECK(value->keyPath() == effectiveObjectStore(m_source)->metadata().ow
n.keyPath); |
329 assertPrimaryKeyValidOrInjectable(m_scriptState.get(), value.get()); | 329 assertPrimaryKeyValidOrInjectable(m_scriptState.get(), value.get()); |
330 } | 330 } |
331 #endif | 331 #endif |
332 | 332 |
333 onSuccessInternal(IDBAny::create(value.release())); | 333 onSuccessInternal(IDBAny::create(value.release())); |
334 } | 334 } |
335 | 335 |
336 void IDBRequest::onSuccess(int64_t value) | 336 void IDBRequest::onSuccess(int64_t value) |
337 { | 337 { |
338 IDB_TRACE("IDBRequest::onSuccess(int64_t)"); | 338 IDB_TRACE("IDBRequest::onSuccess(int64_t)"); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 ExecutionContext* IDBRequest::getExecutionContext() const | 413 ExecutionContext* IDBRequest::getExecutionContext() const |
414 { | 414 { |
415 return ActiveDOMObject::getExecutionContext(); | 415 return ActiveDOMObject::getExecutionContext(); |
416 } | 416 } |
417 | 417 |
418 DispatchEventResult IDBRequest::dispatchEventInternal(Event* event) | 418 DispatchEventResult IDBRequest::dispatchEventInternal(Event* event) |
419 { | 419 { |
420 IDB_TRACE("IDBRequest::dispatchEvent"); | 420 IDB_TRACE("IDBRequest::dispatchEvent"); |
421 if (m_contextStopped || !getExecutionContext()) | 421 if (m_contextStopped || !getExecutionContext()) |
422 return DispatchEventResult::CanceledBeforeDispatch; | 422 return DispatchEventResult::CanceledBeforeDispatch; |
423 ASSERT(m_readyState == PENDING); | 423 DCHECK_EQ(m_readyState, PENDING); |
424 ASSERT(m_hasPendingActivity); | 424 ASSERT(m_hasPendingActivity); |
425 ASSERT(m_enqueuedEvents.size()); | 425 ASSERT(m_enqueuedEvents.size()); |
426 ASSERT(event->target() == this); | 426 ASSERT(event->target() == this); |
427 | 427 |
428 ScriptState::Scope scope(m_scriptState.get()); | 428 ScriptState::Scope scope(m_scriptState.get()); |
429 | 429 |
430 if (event->type() != EventTypeNames::blocked) | 430 if (event->type() != EventTypeNames::blocked) |
431 m_readyState = DONE; | 431 m_readyState = DONE; |
432 dequeueEvent(event); | 432 dequeueEvent(event); |
433 | 433 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 | 535 |
536 void IDBRequest::dequeueEvent(Event* event) | 536 void IDBRequest::dequeueEvent(Event* event) |
537 { | 537 { |
538 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 538 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
539 if (m_enqueuedEvents[i].get() == event) | 539 if (m_enqueuedEvents[i].get() == event) |
540 m_enqueuedEvents.remove(i); | 540 m_enqueuedEvents.remove(i); |
541 } | 541 } |
542 } | 542 } |
543 | 543 |
544 } // namespace blink | 544 } // namespace blink |
OLD | NEW |