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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.cpp

Issue 2432883002: Replaced PassRefPtr copies with moves in unit tests. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandleTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.cpp b/third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.cpp
index d224f6f26f9c6eb12053bbba0ece34c812a7057f..0a4c895c3008d7594550702a91de0af4cee45bfa 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.cpp
@@ -13,7 +13,7 @@ PassRefPtr<ScriptStateForTesting> ScriptStateForTesting::create(
v8::Local<v8::Context> context,
PassRefPtr<DOMWrapperWorld> world) {
RefPtr<ScriptStateForTesting> scriptState =
- adoptRef(new ScriptStateForTesting(context, world));
+ adoptRef(new ScriptStateForTesting(context, std::move(world)));
// This ref() is for keeping this ScriptState alive as long as the v8::Context
// is alive. This is deref()ed in the weak callback of the v8::Context.
scriptState->ref();
@@ -22,7 +22,7 @@ PassRefPtr<ScriptStateForTesting> ScriptStateForTesting::create(
ScriptStateForTesting::ScriptStateForTesting(v8::Local<v8::Context> context,
PassRefPtr<DOMWrapperWorld> world)
- : ScriptState(context, world) {}
+ : ScriptState(context, std::move(world)) {}
ExecutionContext* ScriptStateForTesting::getExecutionContext() const {
return m_executionContext;
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698