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

Unified Diff: third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp

Issue 2178223002: Refactor Worklet class to use ScriptResource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: synced to the head Created 4 years, 4 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/csspaint/PaintWorklet.cpp
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp b/third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp
index 323e79afff5f16ca42e50dc09d8f0ec0483a5b7f..6ec0e4fd8db7c24085b1c10d917e475b49f6b378 100644
--- a/third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp
+++ b/third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp
@@ -5,22 +5,21 @@
#include "modules/csspaint/PaintWorklet.h"
#include "bindings/core/v8/V8Binding.h"
-#include "core/dom/ExecutionContext.h"
#include "modules/csspaint/PaintWorkletGlobalScope.h"
namespace blink {
// static
-PaintWorklet* PaintWorklet::create(LocalFrame* frame, ExecutionContext* executionContext)
+PaintWorklet* PaintWorklet::create(LocalFrame* frame)
{
- PaintWorklet* worklet = new PaintWorklet(frame, executionContext);
+ PaintWorklet* worklet = new PaintWorklet(frame);
worklet->suspendIfNeeded();
return worklet;
}
-PaintWorklet::PaintWorklet(LocalFrame* frame, ExecutionContext* executionContext)
- : Worklet(executionContext)
- , m_paintWorkletGlobalScope(PaintWorkletGlobalScope::create(frame, executionContext->url(), executionContext->userAgent(), executionContext->getSecurityOrigin(), toIsolate(executionContext)))
+PaintWorklet::PaintWorklet(LocalFrame* frame)
+ : Worklet(frame)
+ , m_paintWorkletGlobalScope(PaintWorkletGlobalScope::create(frame, frame->document()->url(), frame->document()->userAgent(), frame->document()->getSecurityOrigin(), toIsolate(frame->document())))
{
}

Powered by Google App Engine
This is Rietveld 408576698