| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "modules/webaudio/AudioWorkletProcessorDefinition.h" |
| 6 |
| 7 namespace blink { |
| 8 |
| 9 AudioWorkletProcessorDefinition* AudioWorkletProcessorDefinition::create( |
| 10 v8::Isolate* isolate, |
| 11 const String& name, |
| 12 v8::Local<v8::Function> constructor, |
| 13 v8::Local<v8::Function> process) { |
| 14 DCHECK(!isMainThread()); |
| 15 return new AudioWorkletProcessorDefinition(isolate, name, constructor, |
| 16 process); |
| 17 } |
| 18 |
| 19 AudioWorkletProcessorDefinition::AudioWorkletProcessorDefinition( |
| 20 v8::Isolate* isolate, |
| 21 const String& name, |
| 22 v8::Local<v8::Function> constructor, |
| 23 v8::Local<v8::Function> process) |
| 24 : m_name(name), |
| 25 m_constructor(isolate, constructor), |
| 26 m_process(isolate, process) {} |
| 27 |
| 28 AudioWorkletProcessorDefinition::~AudioWorkletProcessorDefinition() {} |
| 29 |
| 30 v8::Local<v8::Function> AudioWorkletProcessorDefinition::constructorLocal( |
| 31 v8::Isolate* isolate) { |
| 32 DCHECK(!isMainThread()); |
| 33 return m_constructor.newLocal(isolate); |
| 34 } |
| 35 |
| 36 v8::Local<v8::Function> AudioWorkletProcessorDefinition::processLocal( |
| 37 v8::Isolate* isolate) { |
| 38 DCHECK(!isMainThread()); |
| 39 return m_process.newLocal(isolate); |
| 40 } |
| 41 |
| 42 } // namespace blink |
| OLD | NEW |