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

Side by Side Diff: third_party/WebKit/Source/core/frame/SuspendableScriptExecutor.cpp

Issue 2905823003: Replaced usage of RefPtr::Release with std::move wraps in Source/core. (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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/SuspendableScriptExecutor.h" 5 #include "core/frame/SuspendableScriptExecutor.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "bindings/core/v8/ScriptController.h" 8 #include "bindings/core/v8/ScriptController.h"
9 #include "bindings/core/v8/ScriptSourceCode.h" 9 #include "bindings/core/v8/ScriptSourceCode.h"
10 #include "bindings/core/v8/V8BindingForCore.h" 10 #include "bindings/core/v8/V8BindingForCore.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 Vector<v8::Local<v8::Value>> results; 107 Vector<v8::Local<v8::Value>> results;
108 v8::Local<v8::Value> single_result; 108 v8::Local<v8::Value> single_result;
109 Vector<v8::Local<v8::Value>> args; 109 Vector<v8::Local<v8::Value>> args;
110 args.ReserveCapacity(args_.Size()); 110 args.ReserveCapacity(args_.Size());
111 for (size_t i = 0; i < args_.Size(); ++i) 111 for (size_t i = 0; i < args_.Size(); ++i)
112 args.push_back(args_.Get(i)); 112 args.push_back(args_.Get(i));
113 { 113 {
114 std::unique_ptr<UserGestureIndicator> gesture_indicator; 114 std::unique_ptr<UserGestureIndicator> gesture_indicator;
115 if (gesture_token_) { 115 if (gesture_token_) {
116 gesture_indicator = 116 gesture_indicator =
117 WTF::WrapUnique(new UserGestureIndicator(gesture_token_.Release())); 117 WTF::WrapUnique(new UserGestureIndicator(std::move(gesture_token_)));
118 } 118 }
119 if (V8ScriptRunner::CallFunction(function_.NewLocal(isolate), 119 if (V8ScriptRunner::CallFunction(function_.NewLocal(isolate),
120 frame->GetDocument(), 120 frame->GetDocument(),
121 receiver_.NewLocal(isolate), args.size(), 121 receiver_.NewLocal(isolate), args.size(),
122 args.data(), ToIsolate(frame)) 122 args.data(), ToIsolate(frame))
123 .ToLocal(&single_result)) 123 .ToLocal(&single_result))
124 results.push_back(single_result); 124 results.push_back(single_result);
125 } 125 }
126 return results; 126 return results;
127 } 127 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 keep_alive_.Clear(); 243 keep_alive_.Clear();
244 Stop(); 244 Stop();
245 } 245 }
246 246
247 DEFINE_TRACE(SuspendableScriptExecutor) { 247 DEFINE_TRACE(SuspendableScriptExecutor) {
248 visitor->Trace(executor_); 248 visitor->Trace(executor_);
249 SuspendableTimer::Trace(visitor); 249 SuspendableTimer::Trace(visitor);
250 } 250 }
251 251
252 } // namespace blink 252 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMTypedArray.h ('k') | third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698