| Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| index 1d5125ee59c317f28a82106e7af4bd3e1f00826c..f0449e4394878d25f29f793afc6610ad4f3f55f6 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "bindings/modules/v8/WebGLAny.h"
|
| #include "core/dom/DOMArrayBuffer.h"
|
| #include "core/dom/DOMTypedArray.h"
|
| +#include "core/dom/ExecutionContext.h"
|
| #include "core/dom/FlexibleArrayBufferView.h"
|
| #include "core/dom/TaskRunnerHelper.h"
|
| #include "core/frame/ImageBitmap.h"
|
| @@ -647,7 +648,7 @@
|
| DCHECK(!canvas || IsMainThread());
|
|
|
| auto execution_context = canvas ? canvas->GetDocument().GetExecutionContext()
|
| - : script_state->GetExecutionContext();
|
| + : ExecutionContext::From(script_state);
|
| Platform::ContextAttributes context_attributes = ToPlatformContextAttributes(
|
| attributes, web_gl_version,
|
| SupportOwnOffscreenSurface(execution_context));
|
| @@ -655,7 +656,7 @@
|
| Platform::GraphicsInfo gl_info;
|
| std::unique_ptr<WebGraphicsContext3DProvider> context_provider;
|
| const auto& url = canvas ? canvas->GetDocument().TopDocument().Url()
|
| - : script_state->GetExecutionContext()->Url();
|
| + : ExecutionContext::From(script_state)->Url();
|
| if (IsMainThread()) {
|
| context_provider = WTF::WrapUnique(
|
| Platform::Current()->CreateOffscreenGraphicsContext3DProvider(
|
| @@ -736,7 +737,7 @@
|
| ScriptState* script_state) {
|
| UseCounter::Feature feature =
|
| UseCounter::kOffscreenCanvasTransferToImageBitmapWebGL;
|
| - UseCounter::Count(script_state->GetExecutionContext(), feature);
|
| + UseCounter::Count(ExecutionContext::From(script_state), feature);
|
| if (!GetDrawingBuffer())
|
| return nullptr;
|
| return ImageBitmap::Create(GetDrawingBuffer()->TransferToStaticBitmapImage());
|
| @@ -746,7 +747,7 @@
|
| ScriptState* script_state,
|
| ExceptionState& exception_state) {
|
| UseCounter::Feature feature = UseCounter::kOffscreenCanvasCommitWebGL;
|
| - UseCounter::Count(script_state->GetExecutionContext(), feature);
|
| + UseCounter::Count(ExecutionContext::From(script_state), feature);
|
| if (!offscreenCanvas()) {
|
| exception_state.ThrowDOMException(kInvalidStateError,
|
| "Commit() was called on a rendering "
|
|
|