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

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

Issue 2760323002: OfflineAudioContext: add missing suspendIfNeeded() call. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | 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 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 #include "platform/audio/IIRFilter.h" 75 #include "platform/audio/IIRFilter.h"
76 #include "public/platform/Platform.h" 76 #include "public/platform/Platform.h"
77 #include "wtf/text/WTFString.h" 77 #include "wtf/text/WTFString.h"
78 78
79 namespace blink { 79 namespace blink {
80 80
81 BaseAudioContext* BaseAudioContext::create( 81 BaseAudioContext* BaseAudioContext::create(
82 Document& document, 82 Document& document,
83 const AudioContextOptions& contextOptions, 83 const AudioContextOptions& contextOptions,
84 ExceptionState& exceptionState) { 84 ExceptionState& exceptionState) {
85 return AudioContext::create(document, contextOptions, exceptionState); 85 BaseAudioContext* context =
86 AudioContext::create(document, contextOptions, exceptionState);
87 context->suspendIfNeeded();
Raymond Toy 2017/03/21 15:29:48 AudioContext::create calls suspendIfNeeded() too.
sof 2017/03/21 15:44:35 No, not at all - thanks for pointing that out. I
88 return context;
86 } 89 }
87 90
88 // FIXME(dominicc): Devolve these constructors to AudioContext 91 // FIXME(dominicc): Devolve these constructors to AudioContext
89 // and OfflineAudioContext respectively. 92 // and OfflineAudioContext respectively.
90 93
91 // Constructor for rendering to the audio hardware. 94 // Constructor for rendering to the audio hardware.
92 BaseAudioContext::BaseAudioContext(Document* document) 95 BaseAudioContext::BaseAudioContext(Document* document)
93 : SuspendableObject(document), 96 : SuspendableObject(document),
94 m_destinationNode(nullptr), 97 m_destinationNode(nullptr),
95 m_isCleared(false), 98 m_isCleared(false),
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 } 904 }
902 905
903 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const { 906 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const {
904 if (getExecutionContext()) 907 if (getExecutionContext())
905 return getExecutionContext()->getSecurityOrigin(); 908 return getExecutionContext()->getSecurityOrigin();
906 909
907 return nullptr; 910 return nullptr;
908 } 911 }
909 912
910 } // namespace blink 913 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698