| OLD | NEW |
| 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/webaudio/AudioWorkletThread.h" | 5 #include "modules/webaudio/AudioWorkletThread.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptSourceCode.h" | 7 #include "bindings/core/v8/ScriptSourceCode.h" |
| 8 #include "bindings/core/v8/SourceLocation.h" | 8 #include "bindings/core/v8/SourceLocation.h" |
| 9 #include "bindings/core/v8/V8GCController.h" | 9 #include "bindings/core/v8/V8GCController.h" |
| 10 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" | 10 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // A null WorkerReportingProxy, supplied when creating AudioWorkletThreads. | 34 // A null WorkerReportingProxy, supplied when creating AudioWorkletThreads. |
| 35 class TestAudioWorkletReportingProxy : public WorkerReportingProxy { | 35 class TestAudioWorkletReportingProxy : public WorkerReportingProxy { |
| 36 public: | 36 public: |
| 37 static std::unique_ptr<TestAudioWorkletReportingProxy> create() { | 37 static std::unique_ptr<TestAudioWorkletReportingProxy> create() { |
| 38 return wrapUnique(new TestAudioWorkletReportingProxy()); | 38 return wrapUnique(new TestAudioWorkletReportingProxy()); |
| 39 } | 39 } |
| 40 | 40 |
| 41 // (Empty) WorkerReportingProxy implementation: | 41 // (Empty) WorkerReportingProxy implementation: |
| 42 void countFeature(UseCounter::Feature) override {} |
| 43 void countDeprecation(UseCounter::Feature) override {} |
| 42 void reportException(const String& errorMessage, | 44 void reportException(const String& errorMessage, |
| 43 std::unique_ptr<SourceLocation>, | 45 std::unique_ptr<SourceLocation>, |
| 44 int exceptionId) override {} | 46 int exceptionId) override {} |
| 45 void reportConsoleMessage(MessageSource, | 47 void reportConsoleMessage(MessageSource, |
| 46 MessageLevel, | 48 MessageLevel, |
| 47 const String& message, | 49 const String& message, |
| 48 SourceLocation*) override {} | 50 SourceLocation*) override {} |
| 49 void postMessageToPageInspector(const String&) override {} | 51 void postMessageToPageInspector(const String&) override {} |
| 50 ParentFrameTaskRunners* getParentFrameTaskRunners() override { | 52 ParentFrameTaskRunners* getParentFrameTaskRunners() override { |
| 51 return m_parentFrameTaskRunners.get(); | 53 return m_parentFrameTaskRunners.get(); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 ASSERT_TRUE(secondIsolate); | 196 ASSERT_TRUE(secondIsolate); |
| 195 EXPECT_EQ(firstIsolate, secondIsolate); | 197 EXPECT_EQ(firstIsolate, secondIsolate); |
| 196 | 198 |
| 197 // Verify that the isolate can run some scripts correctly in the second | 199 // Verify that the isolate can run some scripts correctly in the second |
| 198 // worklet. | 200 // worklet. |
| 199 checkWorkletCanExecuteScript(secondWorklet.get()); | 201 checkWorkletCanExecuteScript(secondWorklet.get()); |
| 200 secondWorklet->terminateAndWait(); | 202 secondWorklet->terminateAndWait(); |
| 201 } | 203 } |
| 202 | 204 |
| 203 } // namespace blink | 205 } // namespace blink |
| OLD | NEW |