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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.cpp

Issue 2903703003: Use wrapper tracing for worklets. (Closed)
Patch Set: Separating in two CLs 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
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/webaudio/AudioWorkletProcessorDefinition.h" 5 #include "modules/webaudio/AudioWorkletProcessorDefinition.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 AudioWorkletProcessorDefinition* AudioWorkletProcessorDefinition::Create( 9 AudioWorkletProcessorDefinition* AudioWorkletProcessorDefinition::Create(
10 v8::Isolate* isolate, 10 v8::Isolate* isolate,
11 const String& name, 11 const String& name,
12 v8::Local<v8::Function> constructor, 12 v8::Local<v8::Function> constructor,
13 v8::Local<v8::Function> process) { 13 v8::Local<v8::Function> process) {
14 DCHECK(!IsMainThread()); 14 DCHECK(!IsMainThread());
15 return new AudioWorkletProcessorDefinition(isolate, name, constructor, 15 return new AudioWorkletProcessorDefinition(isolate, name, constructor,
16 process); 16 process);
17 } 17 }
18 18
19 AudioWorkletProcessorDefinition::AudioWorkletProcessorDefinition( 19 AudioWorkletProcessorDefinition::AudioWorkletProcessorDefinition(
20 v8::Isolate* isolate, 20 v8::Isolate* isolate,
21 const String& name, 21 const String& name,
22 v8::Local<v8::Function> constructor, 22 v8::Local<v8::Function> constructor,
23 v8::Local<v8::Function> process) 23 v8::Local<v8::Function> process)
24 : name_(name), 24 : name_(name),
25 constructor_(isolate, constructor), 25 constructor_(isolate, this, constructor),
26 process_(isolate, process) {} 26 process_(isolate, this, process) {}
27 27
28 AudioWorkletProcessorDefinition::~AudioWorkletProcessorDefinition() {} 28 AudioWorkletProcessorDefinition::~AudioWorkletProcessorDefinition() {}
29 29
30 v8::Local<v8::Function> AudioWorkletProcessorDefinition::ConstructorLocal( 30 v8::Local<v8::Function> AudioWorkletProcessorDefinition::ConstructorLocal(
31 v8::Isolate* isolate) { 31 v8::Isolate* isolate) {
32 DCHECK(!IsMainThread()); 32 DCHECK(!IsMainThread());
33 return constructor_.NewLocal(isolate); 33 return constructor_.NewLocal(isolate);
34 } 34 }
35 35
36 v8::Local<v8::Function> AudioWorkletProcessorDefinition::ProcessLocal( 36 v8::Local<v8::Function> AudioWorkletProcessorDefinition::ProcessLocal(
37 v8::Isolate* isolate) { 37 v8::Isolate* isolate) {
38 DCHECK(!IsMainThread()); 38 DCHECK(!IsMainThread());
39 return process_.NewLocal(isolate); 39 return process_.NewLocal(isolate);
40 } 40 }
41 41
42 DEFINE_TRACE_WRAPPERS(AudioWorkletProcessorDefinition) {
43 visitor->TraceWrappers(constructor_.Cast<v8::Value>());
44 visitor->TraceWrappers(process_.Cast<v8::Value>());
45 }
46
42 } // namespace blink 47 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698