diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/script/module_map_test.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/script/module_map_test.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chromium/third_party/blink/renderer/core/script/module_map_test.cc b/chromium/third_party/blink/renderer/core/script/module_map_test.cc index 4391d56fd2f..6b5f0054de8 100644 --- a/chromium/third_party/blink/renderer/core/script/module_map_test.cc +++ b/chromium/third_party/blink/renderer/core/script/module_map_test.cc @@ -112,11 +112,10 @@ class ModuleMapTestModulator final : public DummyModulator { void Fetch(FetchParameters& request, ModuleGraphLevel, ModuleScriptFetcher::Client* client) override { - TestRequest* test_request = new TestRequest( + TestRequest* test_request = MakeGarbageCollected<TestRequest>( ModuleScriptCreationParams( request.Url(), ParkableString(String("").ReleaseImpl()), - request.GetResourceRequest().GetFetchCredentialsMode(), - kSharableCrossOrigin), + request.GetResourceRequest().GetFetchCredentialsMode()), client); modulator_->test_requests_.push_back(test_request); } @@ -132,7 +131,7 @@ class ModuleMapTestModulator final : public DummyModulator { ModuleScriptFetcher* CreateModuleScriptFetcher( ModuleScriptCustomFetchType) override { - return new TestModuleScriptFetcher(this); + return MakeGarbageCollected<TestModuleScriptFetcher>(this); } Vector<ModuleRequest> ModuleRequestsFromScriptModule(ScriptModule) override { @@ -140,7 +139,7 @@ class ModuleMapTestModulator final : public DummyModulator { } base::SingleThreadTaskRunner* TaskRunner() override { - return Platform::Current()->CurrentThread()->GetTaskRunner().get(); + return Thread::Current()->GetTaskRunner().get(); }; struct TestRequest final : public GarbageCollectedFinalized<TestRequest> { @@ -198,8 +197,8 @@ void ModuleMapTest::SetUp() { PageTestBase::SetUp(IntSize(500, 500)); GetDocument().SetURL(KURL("https://example.com")); GetDocument().SetSecurityOrigin(SecurityOrigin::Create(GetDocument().Url())); - modulator_ = - new ModuleMapTestModulator(ToScriptStateForMainWorld(&GetFrame())); + modulator_ = MakeGarbageCollected<ModuleMapTestModulator>( + ToScriptStateForMainWorld(&GetFrame())); map_ = ModuleMap::Create(modulator_); } |