| 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;
|
|
|