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

Side by Side Diff: third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp

Issue 2308343002: Replaced PassRefPtr copites with moves in Source/modules. (Closed)
Patch Set: Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "modules/csspaint/PaintWorkletGlobalScope.h" 5 #include "modules/csspaint/PaintWorkletGlobalScope.h"
6 6
7 #include "bindings/core/v8/V8BindingMacros.h" 7 #include "bindings/core/v8/V8BindingMacros.h"
8 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" 8 #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
9 #include "core/CSSPropertyNames.h" 9 #include "core/CSSPropertyNames.h"
10 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
11 #include "core/inspector/MainThreadDebugger.h" 11 #include "core/inspector/MainThreadDebugger.h"
12 #include "modules/csspaint/CSSPaintDefinition.h" 12 #include "modules/csspaint/CSSPaintDefinition.h"
13 #include "modules/csspaint/CSSPaintImageGeneratorImpl.h" 13 #include "modules/csspaint/CSSPaintImageGeneratorImpl.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 // static 17 // static
18 PaintWorkletGlobalScope* PaintWorkletGlobalScope::create(LocalFrame* frame, cons t KURL& url, const String& userAgent, PassRefPtr<SecurityOrigin> securityOrigin, v8::Isolate* isolate) 18 PaintWorkletGlobalScope* PaintWorkletGlobalScope::create(LocalFrame* frame, cons t KURL& url, const String& userAgent, PassRefPtr<SecurityOrigin> securityOrigin, v8::Isolate* isolate)
19 { 19 {
20 PaintWorkletGlobalScope* paintWorkletGlobalScope = new PaintWorkletGlobalSco pe(frame, url, userAgent, securityOrigin, isolate); 20 PaintWorkletGlobalScope* paintWorkletGlobalScope = new PaintWorkletGlobalSco pe(frame, url, userAgent, std::move(securityOrigin), isolate);
21 paintWorkletGlobalScope->scriptController()->initializeContextIfNeeded(); 21 paintWorkletGlobalScope->scriptController()->initializeContextIfNeeded();
22 MainThreadDebugger::instance()->contextCreated(paintWorkletGlobalScope->scri ptController()->getScriptState(), paintWorkletGlobalScope->frame(), paintWorklet GlobalScope->getSecurityOrigin()); 22 MainThreadDebugger::instance()->contextCreated(paintWorkletGlobalScope->scri ptController()->getScriptState(), paintWorkletGlobalScope->frame(), paintWorklet GlobalScope->getSecurityOrigin());
23 return paintWorkletGlobalScope; 23 return paintWorkletGlobalScope;
24 } 24 }
25 25
26 PaintWorkletGlobalScope::PaintWorkletGlobalScope(LocalFrame* frame, const KURL& url, const String& userAgent, PassRefPtr<SecurityOrigin> securityOrigin, v8::Iso late* isolate) 26 PaintWorkletGlobalScope::PaintWorkletGlobalScope(LocalFrame* frame, const KURL& url, const String& userAgent, PassRefPtr<SecurityOrigin> securityOrigin, v8::Iso late* isolate)
27 : MainThreadWorkletGlobalScope(frame, url, userAgent, securityOrigin, isolat e) 27 : MainThreadWorkletGlobalScope(frame, url, userAgent, std::move(securityOrig in), isolate)
28 { 28 {
29 } 29 }
30 30
31 PaintWorkletGlobalScope::~PaintWorkletGlobalScope() 31 PaintWorkletGlobalScope::~PaintWorkletGlobalScope()
32 { 32 {
33 } 33 }
34 34
35 void PaintWorkletGlobalScope::dispose() 35 void PaintWorkletGlobalScope::dispose()
36 { 36 {
37 // Explicitly clear the paint defininitions to break a reference cycle 37 // Explicitly clear the paint defininitions to break a reference cycle
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 DEFINE_TRACE(PaintWorkletGlobalScope) 155 DEFINE_TRACE(PaintWorkletGlobalScope)
156 { 156 {
157 visitor->trace(m_paintDefinitions); 157 visitor->trace(m_paintDefinitions);
158 visitor->trace(m_pendingGenerators); 158 visitor->trace(m_pendingGenerators);
159 MainThreadWorkletGlobalScope::trace(visitor); 159 MainThreadWorkletGlobalScope::trace(visitor);
160 } 160 }
161 161
162 } // namespace blink 162 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698