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

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

Issue 2871513002: Worklet: Lazily create PaintWorkletGlobalScopes (Closed)
Patch Set: fix wrong dcheck Created 3 years, 7 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/PaintWorkletGlobalScopeProxy.cpp
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScopeProxy.cpp b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScopeProxy.cpp
index 6b6aab8dd4c893c817b8b6cd49679e59c90d8ef3..39c89dd8f91bab58edddeafa484ab5c7b7efb668 100644
--- a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScopeProxy.cpp
+++ b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScopeProxy.cpp
@@ -18,12 +18,15 @@ PaintWorkletGlobalScopeProxy* PaintWorkletGlobalScopeProxy::From(
return static_cast<PaintWorkletGlobalScopeProxy*>(proxy);
}
-PaintWorkletGlobalScopeProxy::PaintWorkletGlobalScopeProxy(LocalFrame* frame) {
+PaintWorkletGlobalScopeProxy::PaintWorkletGlobalScopeProxy(
+ LocalFrame* frame,
+ PaintWorkletPendingGeneratorRegistry* pending_generator_registry) {
DCHECK(IsMainThread());
Document* document = frame->GetDocument();
global_scope_ = PaintWorkletGlobalScope::Create(
frame, document->Url(), document->UserAgent(),
- document->GetSecurityOrigin(), ToIsolate(document));
+ document->GetSecurityOrigin(), ToIsolate(document),
+ pending_generator_registry);
}
void PaintWorkletGlobalScopeProxy::FetchAndInvokeScript(
@@ -55,11 +58,4 @@ CSSPaintDefinition* PaintWorkletGlobalScopeProxy::FindDefinition(
return global_scope_->FindDefinition(name);
}
-void PaintWorkletGlobalScopeProxy::AddPendingGenerator(
- const String& name,
- CSSPaintImageGeneratorImpl* generator) {
- DCHECK(IsMainThread());
- global_scope_->AddPendingGenerator(name, generator);
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698