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

Side by Side Diff: third_party/WebKit/Source/core/frame/Deprecation.cpp

Issue 2558643005: Worker: Enable UseCounter for MainThreadWorkletGlobalScope (Closed)
Patch Set: fix KURL Created 4 years 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 // 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 "core/frame/Deprecation.h" 5 #include "core/frame/Deprecation.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/ExecutionContext.h" 8 #include "core/dom/ExecutionContext.h"
9 #include "core/frame/FrameConsole.h" 9 #include "core/frame/FrameConsole.h"
10 #include "core/frame/FrameHost.h" 10 #include "core/frame/FrameHost.h"
11 #include "core/frame/LocalFrame.h" 11 #include "core/frame/LocalFrame.h"
12 #include "core/inspector/ConsoleMessage.h" 12 #include "core/inspector/ConsoleMessage.h"
13 #include "core/workers/WorkerGlobalScope.h" 13 #include "core/workers/WorkerOrWorkletGlobalScope.h"
14 14
15 namespace { 15 namespace {
16 16
17 enum Milestone { 17 enum Milestone {
18 M56, 18 M56,
19 M57, 19 M57,
20 M58, 20 M58,
21 M59, 21 M59,
22 }; 22 };
23 23
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 void Deprecation::countDeprecation(ExecutionContext* context, 143 void Deprecation::countDeprecation(ExecutionContext* context,
144 UseCounter::Feature feature) { 144 UseCounter::Feature feature) {
145 if (!context) 145 if (!context)
146 return; 146 return;
147 if (context->isDocument()) { 147 if (context->isDocument()) {
148 Deprecation::countDeprecation(*toDocument(context), feature); 148 Deprecation::countDeprecation(*toDocument(context), feature);
149 return; 149 return;
150 } 150 }
151 if (context->isWorkerGlobalScope()) 151 if (context->isWorkerOrWorkletGlobalScope())
152 toWorkerGlobalScope(context)->countDeprecation(feature); 152 toWorkerOrWorkletGlobalScope(context)->countDeprecation(feature);
153 } 153 }
154 154
155 void Deprecation::countDeprecation(const Document& document, 155 void Deprecation::countDeprecation(const Document& document,
156 UseCounter::Feature feature) { 156 UseCounter::Feature feature) {
157 Deprecation::countDeprecation(document.frame(), feature); 157 Deprecation::countDeprecation(document.frame(), feature);
158 } 158 }
159 159
160 void Deprecation::countDeprecationIfNotPrivateScript( 160 void Deprecation::countDeprecationIfNotPrivateScript(
161 v8::Isolate* isolate, 161 v8::Isolate* isolate,
162 ExecutionContext* context, 162 ExecutionContext* context,
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 return willBeRemoved("HTMLObjectElement legacy caller", M58, 402 return willBeRemoved("HTMLObjectElement legacy caller", M58,
403 "5715026367217664"); 403 "5715026367217664");
404 404
405 // Features that aren't deprecated don't have a deprecation message. 405 // Features that aren't deprecated don't have a deprecation message.
406 default: 406 default:
407 return String(); 407 return String();
408 } 408 }
409 } 409 }
410 410
411 } // namespace blink 411 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698