| 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 1f40dd187e0811faca589ff715e64a7a35f5d5ef..a4b1297159fc5bf8b591ce73834c7c42715e4a4d 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 @@ OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D(
|
| 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 @@ ScriptPromise OffscreenCanvasRenderingContext2D::commit(
|
| 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 @@ ImageBitmap* OffscreenCanvasRenderingContext2D::TransferToImageBitmap(
|
| 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;
|
|
|