| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/worklet/WorkletGlobalScope.h" | 5 #include "modules/worklet/WorkletGlobalScope.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" | 7 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 // static | 11 // static |
| 12 PassRefPtrWillBeRawPtr<WorkletGlobalScope> WorkletGlobalScope::create(const KURL
& url, const String& userAgent, v8::Isolate* isolate) | 12 RawPtr<WorkletGlobalScope> WorkletGlobalScope::create(const KURL& url, const Str
ing& userAgent, v8::Isolate* isolate) |
| 13 { | 13 { |
| 14 RefPtrWillBeRawPtr<WorkletGlobalScope> workletGlobalScope = adoptRefWillBeNo
op(new WorkletGlobalScope(url, userAgent, isolate)); | 14 RawPtr<WorkletGlobalScope> workletGlobalScope = (new WorkletGlobalScope(url,
userAgent, isolate)); |
| 15 workletGlobalScope->script()->initializeContextIfNeeded(); | 15 workletGlobalScope->script()->initializeContextIfNeeded(); |
| 16 return workletGlobalScope.release(); | 16 return workletGlobalScope.release(); |
| 17 } | 17 } |
| 18 | 18 |
| 19 WorkletGlobalScope::WorkletGlobalScope(const KURL& url, const String& userAgent,
v8::Isolate* isolate) | 19 WorkletGlobalScope::WorkletGlobalScope(const KURL& url, const String& userAgent,
v8::Isolate* isolate) |
| 20 : m_script(WorkerOrWorkletScriptController::create(this, isolate)) | 20 : m_script(WorkerOrWorkletScriptController::create(this, isolate)) |
| 21 { | 21 { |
| 22 } | 22 } |
| 23 | 23 |
| 24 WorkletGlobalScope::~WorkletGlobalScope() | 24 WorkletGlobalScope::~WorkletGlobalScope() |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 | 65 |
| 66 DEFINE_TRACE(WorkletGlobalScope) | 66 DEFINE_TRACE(WorkletGlobalScope) |
| 67 { | 67 { |
| 68 visitor->trace(m_script); | 68 visitor->trace(m_script); |
| 69 ExecutionContext::trace(visitor); | 69 ExecutionContext::trace(visitor); |
| 70 SecurityContext::trace(visitor); | 70 SecurityContext::trace(visitor); |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace blink | 73 } // namespace blink |
| OLD | NEW |