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

Side by Side Diff: third_party/WebKit/Source/modules/speech/SpeechRecognition.cpp

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 * * Redistributions of source code must retain the above copyright 7 * * 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 * * Redistributions in binary form must reproduce the above copyright 9 * * 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 const AtomicString& SpeechRecognition::interfaceName() const { 143 const AtomicString& SpeechRecognition::interfaceName() const {
144 return EventTargetNames::SpeechRecognition; 144 return EventTargetNames::SpeechRecognition;
145 } 145 }
146 146
147 ExecutionContext* SpeechRecognition::getExecutionContext() const { 147 ExecutionContext* SpeechRecognition::getExecutionContext() const {
148 return ContextLifecycleObserver::getExecutionContext(); 148 return ContextLifecycleObserver::getExecutionContext();
149 } 149 }
150 150
151 void SpeechRecognition::contextDestroyed() { 151 void SpeechRecognition::contextDestroyed(ExecutionContext*) {
152 m_controller = nullptr; 152 m_controller = nullptr;
153 if (hasPendingActivity()) 153 if (hasPendingActivity())
154 abort(); 154 abort();
155 } 155 }
156 156
157 bool SpeechRecognition::hasPendingActivity() const { 157 bool SpeechRecognition::hasPendingActivity() const {
158 return m_started; 158 return m_started;
159 } 159 }
160 160
161 SpeechRecognition::SpeechRecognition(Page* page, ExecutionContext* context) 161 SpeechRecognition::SpeechRecognition(Page* page, ExecutionContext* context)
(...skipping 17 matching lines...) Expand all
179 DEFINE_TRACE(SpeechRecognition) { 179 DEFINE_TRACE(SpeechRecognition) {
180 visitor->trace(m_grammars); 180 visitor->trace(m_grammars);
181 visitor->trace(m_audioTrack); 181 visitor->trace(m_audioTrack);
182 visitor->trace(m_controller); 182 visitor->trace(m_controller);
183 visitor->trace(m_finalResults); 183 visitor->trace(m_finalResults);
184 EventTargetWithInlineData::trace(visitor); 184 EventTargetWithInlineData::trace(visitor);
185 ContextLifecycleObserver::trace(visitor); 185 ContextLifecycleObserver::trace(visitor);
186 } 186 }
187 187
188 } // namespace blink 188 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698