[webkit-changes] [WebKit/WebKit] 767834: Adopt dynamicDowncast<> in worker code

Anne van Kesteren noreply at github.com
Mon Mar 4 23:32:29 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 767834bd18357e80a84cc48fbedd5edb71a7b743
      https://github.com/WebKit/WebKit/commit/767834bd18357e80a84cc48fbedd5edb71a7b743
  Author: Anne van Kesteren <annevk at annevk.nl>
  Date:   2024-03-04 (Mon, 04 Mar 2024)

  Changed paths:
    M Source/WebCore/workers/WorkerConsoleClient.cpp
    M Source/WebCore/workers/WorkerGlobalScope.cpp
    M Source/WebCore/workers/WorkerOrWorkletThread.cpp
    M Source/WebCore/workers/WorkerScriptLoader.cpp
    M Source/WebCore/workers/WorkerThread.cpp
    M Source/WebCore/workers/service/SWClientConnection.cpp
    M Source/WebCore/workers/service/ServiceWorker.cpp
    M Source/WebCore/workers/service/ServiceWorkerClientData.cpp

  Log Message:
  -----------
  Adopt dynamicDowncast<> in worker code
https://bugs.webkit.org/show_bug.cgi?id=270446

Reviewed by Chris Dumez.

For security & performance.

* Source/WebCore/workers/WorkerConsoleClient.cpp:
(WebCore::WorkerConsoleClient::count):
(WebCore::WorkerConsoleClient::countReset):
(WebCore::WorkerConsoleClient::time):
(WebCore::WorkerConsoleClient::timeLog):
(WebCore::WorkerConsoleClient::timeEnd):
* Source/WebCore/workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts):
(WebCore::WorkerGlobalScope::beginLoadingFontSoon):
* Source/WebCore/workers/WorkerOrWorkletThread.cpp:
(WebCore::WorkerOrWorkletThread::runEventLoop):
* Source/WebCore/workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::didReceiveResponse):
* Source/WebCore/workers/WorkerThread.cpp:
(WebCore::WorkerThread::evaluateScriptIfNecessary):

Cache globalScope() call to avoid repeated downcasting.

* Source/WebCore/workers/service/SWClientConnection.cpp:
(WebCore::SWClientConnection::fromScriptExecutionContext):
* Source/WebCore/workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::swConnection):
(WebCore::ServiceWorker::postMessage):
* Source/WebCore/workers/service/ServiceWorkerClientData.cpp:
(WebCore::toServiceWorkerClientFrameType):

Canonical link: https://commits.webkit.org/275678@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list