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

Unified Diff: third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp

Issue 2871503003: Worklet: Move common code from Worker/WorkletGlobalScope to WorkerOrWorkletGlobalScope (Closed)
Patch Set: fix rebase failure 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/core/workers/WorkletGlobalScope.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp
index 6ae660d4fe2911eb87a854ccf10fa5a006e25592..ebff7eeebb50778dff4b8be3e0413ba87356c107 100644
--- a/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp
@@ -17,21 +17,12 @@ WorkletGlobalScope::WorkletGlobalScope(
const String& user_agent,
PassRefPtr<SecurityOrigin> security_origin,
v8::Isolate* isolate)
- : url_(url),
- user_agent_(user_agent),
- script_controller_(
- WorkerOrWorkletScriptController::Create(this, isolate)) {
+ : WorkerOrWorkletGlobalScope(isolate), url_(url), user_agent_(user_agent) {
SetSecurityOrigin(std::move(security_origin));
}
WorkletGlobalScope::~WorkletGlobalScope() {}
-void WorkletGlobalScope::Dispose() {
- DCHECK(script_controller_);
- script_controller_->Dispose();
- script_controller_.Clear();
-}
-
v8::Local<v8::Object> WorkletGlobalScope::Wrap(
v8::Isolate*,
v8::Local<v8::Object> creation_context) {
@@ -51,14 +42,6 @@ v8::Local<v8::Object> WorkletGlobalScope::AssociateWithWrapper(
return v8::Local<v8::Object>();
}
-void WorkletGlobalScope::DisableEval(const String& error_message) {
- script_controller_->DisableEval(error_message);
-}
-
-bool WorkletGlobalScope::IsJSExecutionForbidden() const {
- return script_controller_->IsExecutionForbidden();
-}
-
bool WorkletGlobalScope::IsSecureContext(String& error_message) const {
// Until there are APIs that are available in worklets and that
// require a privileged context test that checks ancestors, just do
@@ -80,7 +63,6 @@ KURL WorkletGlobalScope::VirtualCompleteURL(const String& url) const {
}
DEFINE_TRACE(WorkletGlobalScope) {
- visitor->Trace(script_controller_);
ExecutionContext::Trace(visitor);
SecurityContext::Trace(visitor);
WorkerOrWorkletGlobalScope::Trace(visitor);

Powered by Google App Engine
This is Rietveld 408576698