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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp

Issue 2909613002: Replaced usage of RefPtr::Release with std::move wraps. (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 IDBAny* value; 379 IDBAny* value;
380 if (!value_) { 380 if (!value_) {
381 value = IDBAny::CreateUndefined(); 381 value = IDBAny::CreateUndefined();
382 } else if (object_store->autoIncrement() && 382 } else if (object_store->autoIncrement() &&
383 !object_store->IdbKeyPath().IsNull()) { 383 !object_store->IdbKeyPath().IsNull()) {
384 RefPtr<IDBValue> idb_value = IDBValue::Create(value_.Get(), primary_key_, 384 RefPtr<IDBValue> idb_value = IDBValue::Create(value_.Get(), primary_key_,
385 object_store->IdbKeyPath()); 385 object_store->IdbKeyPath());
386 #if DCHECK_IS_ON() 386 #if DCHECK_IS_ON()
387 AssertPrimaryKeyValidOrInjectable(script_state, idb_value.Get()); 387 AssertPrimaryKeyValidOrInjectable(script_state, idb_value.Get());
388 #endif // DCHECK_IS_ON() 388 #endif // DCHECK_IS_ON()
389 value = IDBAny::Create(idb_value.Release()); 389 value = IDBAny::Create(std::move(idb_value));
390 } else { 390 } else {
391 value = IDBAny::Create(value_); 391 value = IDBAny::Create(value_);
392 } 392 }
393 393
394 value_dirty_ = false; 394 value_dirty_ = false;
395 ScriptValue script_value = ScriptValue::From(script_state, value); 395 ScriptValue script_value = ScriptValue::From(script_state, value);
396 return script_value; 396 return script_value;
397 } 397 }
398 398
399 ScriptValue IDBCursor::source(ScriptState* script_state) const { 399 ScriptValue IDBCursor::source(ScriptState* script_state) const {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 case kWebIDBCursorDirectionPrevNoDuplicate: 458 case kWebIDBCursorDirectionPrevNoDuplicate:
459 return IndexedDBNames::prevunique; 459 return IndexedDBNames::prevunique;
460 460
461 default: 461 default:
462 NOTREACHED(); 462 NOTREACHED();
463 return IndexedDBNames::next; 463 return IndexedDBNames::next;
464 } 464 }
465 } 465 }
466 466
467 } // namespace blink 467 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/Response.cpp ('k') | third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698