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

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

Issue 2821443002: Revert of Move ScriptState::GetExecutionContext (Part 5) (Closed)
Patch Set: Revert 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 47d43f04c78cec3ad322853e7b3e06c953d86407..2c10b1ad34fc2cdfcd6941511b761e8c618de9c2 100644
--- a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
@@ -5,7 +5,6 @@
#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"
@@ -27,7 +26,7 @@ OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D(
OffscreenCanvas* canvas,
const CanvasContextCreationAttributes& attrs)
: CanvasRenderingContext(nullptr, canvas, attrs) {
- ExecutionContext* execution_context = ExecutionContext::From(script_state);
+ ExecutionContext* execution_context = script_state->GetExecutionContext();
if (execution_context->IsDocument()) {
if (ToDocument(execution_context)
->GetSettings()
@@ -51,7 +50,7 @@ ScriptPromise OffscreenCanvasRenderingContext2D::commit(
ScriptState* script_state,
ExceptionState& exception_state) {
UseCounter::Feature feature = UseCounter::kOffscreenCanvasCommit2D;
- UseCounter::Count(ExecutionContext::From(script_state), feature);
+ UseCounter::Count(script_state->GetExecutionContext(), 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
@@ -158,7 +157,7 @@ ImageBitmap* OffscreenCanvasRenderingContext2D::TransferToImageBitmap(
ScriptState* script_state) {
UseCounter::Feature feature =
UseCounter::kOffscreenCanvasTransferToImageBitmap2D;
- UseCounter::Count(ExecutionContext::From(script_state), feature);
+ UseCounter::Count(script_state->GetExecutionContext(), feature);
RefPtr<StaticBitmapImage> image = TransferToStaticBitmapImage();
if (!image)
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698