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

Unified Diff: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp

Issue 2815313002: Reland of Move ScriptState::GetExecutionContext (Part 5) (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
index 2c10b1ad34fc2cdfcd6941511b761e8c618de9c2..47d43f04c78cec3ad322853e7b3e06c953d86407 100644
--- a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
@@ -5,6 +5,7 @@
#include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h"
#include "bindings/modules/v8/OffscreenCanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContext.h"
+#include "core/dom/ExecutionContext.h"
#include "core/frame/ImageBitmap.h"
#include "core/frame/Settings.h"
#include "core/workers/WorkerGlobalScope.h"
@@ -26,7 +27,7 @@
OffscreenCanvas* canvas,
const CanvasContextCreationAttributes& attrs)
: CanvasRenderingContext(nullptr, canvas, attrs) {
- ExecutionContext* execution_context = script_state->GetExecutionContext();
+ ExecutionContext* execution_context = ExecutionContext::From(script_state);
if (execution_context->IsDocument()) {
if (ToDocument(execution_context)
->GetSettings()
@@ -50,7 +51,7 @@
ScriptState* script_state,
ExceptionState& exception_state) {
UseCounter::Feature feature = UseCounter::kOffscreenCanvasCommit2D;
- UseCounter::Count(script_state->GetExecutionContext(), feature);
+ UseCounter::Count(ExecutionContext::From(script_state), feature);
if (!offscreenCanvas()->HasPlaceholderCanvas()) {
// If an OffscreenCanvas has no associated canvas Id, it indicates that
// it is not an OffscreenCanvas created by transfering control from html
@@ -157,7 +158,7 @@
ScriptState* script_state) {
UseCounter::Feature feature =
UseCounter::kOffscreenCanvasTransferToImageBitmap2D;
- UseCounter::Count(script_state->GetExecutionContext(), feature);
+ UseCounter::Count(ExecutionContext::From(script_state), feature);
RefPtr<StaticBitmapImage> image = TransferToStaticBitmapImage();
if (!image)
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698