Diff
Modified: trunk/Source/WebCore/ChangeLog (286024 => 286025)
--- trunk/Source/WebCore/ChangeLog 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/ChangeLog 2021-11-18 21:28:14 UTC (rev 286025)
@@ -1,3 +1,50 @@
+2021-11-18 Chris Dumez <[email protected]>
+
+ Port call sites to ScriptExecutionContext::identifier() and drop ScriptExecutionContext::contextIdentifier()
+ https://bugs.webkit.org/show_bug.cgi?id=233323
+
+ Reviewed by Geoffrey Garen.
+
+ Port call sites to ScriptExecutionContext::identifier() and drop ScriptExecutionContext::contextIdentifier() alias.
+
+ * Modules/mediacapabilities/MediaCapabilities.cpp:
+ (WebCore::MediaCapabilities::decodingInfo):
+ (WebCore::MediaCapabilities::encodingInfo):
+ * Modules/mediastream/RTCDataChannel.cpp:
+ (WebCore::RTCDataChannel::create):
+ (WebCore::m_contextIdentifier):
+ * Modules/mediastream/RTCRtpSFrameTransform.cpp:
+ (WebCore::RTCRtpSFrameTransform::initializeTransformer):
+ (WebCore::RTCRtpSFrameTransform::createStreams):
+ * crypto/CryptoAlgorithm.cpp:
+ (WebCore::dispatchAlgorithmOperation):
+ * crypto/algorithms/CryptoAlgorithmECDH.cpp:
+ (WebCore::CryptoAlgorithmECDH::deriveBits):
+ * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
+ (WebCore::CryptoAlgorithmSHA1::digest):
+ * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
+ (WebCore::CryptoAlgorithmSHA224::digest):
+ * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
+ (WebCore::CryptoAlgorithmSHA256::digest):
+ * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
+ (WebCore::CryptoAlgorithmSHA384::digest):
+ * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
+ (WebCore::CryptoAlgorithmSHA512::digest):
+ * crypto/mac/CryptoKeyRSAMac.cpp:
+ (WebCore::CryptoKeyRSA::generatePair):
+ * dom/BroadcastChannel.cpp:
+ (WebCore::BroadcastChannel::MainThreadBridge::registerChannel):
+ * dom/ScriptExecutionContext.cpp:
+ (WebCore::ScriptExecutionContext::ScriptExecutionContext):
+ (WebCore::ScriptExecutionContext::removeFromContextsMap):
+ (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
+ * dom/ScriptExecutionContext.h:
+ (WebCore::ScriptExecutionContext::identifier const):
+ (WebCore::ScriptExecutionContext::contextIdentifier const): Deleted.
+ * workers/WorkerGlobalScope.cpp:
+ (WebCore::m_credentials):
+ (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
+
2021-11-18 Alan Bujtas <[email protected]>
[IFC][Integration] Switching line layout path should invalidate preferred width
Modified: trunk/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.cpp (286024 => 286025)
--- trunk/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -257,7 +257,7 @@
}
m_decodingTasks.add(++m_nextTaskIdentifier, WTFMove(callback));
- context.postTaskToResponsibleDocument([configuration = WTFMove(configuration).isolatedCopy(), contextIdentifier = context.contextIdentifier(), weakThis = WeakPtr { this }, taskIdentifier = m_nextTaskIdentifier](auto& document) mutable {
+ context.postTaskToResponsibleDocument([configuration = WTFMove(configuration).isolatedCopy(), contextIdentifier = context.identifier(), weakThis = WeakPtr { this }, taskIdentifier = m_nextTaskIdentifier](auto& document) mutable {
gatherDecodingInfo(document, WTFMove(configuration), [contextIdentifier, weakThis = WTFMove(weakThis), taskIdentifier](auto&& result) mutable {
ScriptExecutionContext::postTaskTo(contextIdentifier, [weakThis = WTFMove(weakThis), taskIdentifier, result = WTFMove(result).isolatedCopy()](auto&) mutable {
if (!weakThis)
@@ -314,7 +314,7 @@
}
m_encodingTasks.add(++m_nextTaskIdentifier, WTFMove(callback));
- context.postTaskToResponsibleDocument([configuration = WTFMove(configuration).isolatedCopy(), contextIdentifier = context.contextIdentifier(), weakThis = WeakPtr { this }, taskIdentifier = m_nextTaskIdentifier](auto& document) mutable {
+ context.postTaskToResponsibleDocument([configuration = WTFMove(configuration).isolatedCopy(), contextIdentifier = context.identifier(), weakThis = WeakPtr { this }, taskIdentifier = m_nextTaskIdentifier](auto& document) mutable {
gatherEncodingInfo(document, WTFMove(configuration), [contextIdentifier, weakThis = WTFMove(weakThis), taskIdentifier](auto&& result) mutable {
ScriptExecutionContext::postTaskTo(contextIdentifier, [weakThis = WTFMove(weakThis), taskIdentifier, result = WTFMove(result).isolatedCopy()](auto&) mutable {
if (!weakThis)
Modified: trunk/Source/WebCore/Modules/mediastream/RTCDataChannel.cpp (286024 => 286025)
--- trunk/Source/WebCore/Modules/mediastream/RTCDataChannel.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDataChannel.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -71,7 +71,7 @@
if (!channel->m_handler)
return;
if (auto* context = channel->scriptExecutionContext())
- channel->m_handler->setClient(*channel, context->contextIdentifier());
+ channel->m_handler->setClient(*channel, context->identifier());
});
return channel;
}
@@ -97,7 +97,7 @@
: ActiveDOMObject(&context)
, m_handler(WTFMove(handler))
, m_identifier(RTCDataChannelIdentifier { Process::identifier(), ObjectIdentifier<RTCDataChannelLocalIdentifierType>::generateThreadSafe() })
- , m_contextIdentifier(context.isDocument() ? ScriptExecutionContextIdentifier { } : context.contextIdentifier())
+ , m_contextIdentifier(context.isDocument() ? ScriptExecutionContextIdentifier { } : context.identifier())
, m_label(WTFMove(label))
, m_options(WTFMove(options))
, m_messageQueue(createMessageQueue(context, *this))
Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp (286024 => 286025)
--- trunk/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -159,7 +159,7 @@
m_transformer->setIsEncrypting(side == Side::Sender);
m_transformer->setMediaType(backend.mediaType());
- backend.setTransformableFrameCallback([transformer = m_transformer, identifier = context->contextIdentifier(), backend = Ref { backend }, weakThis = WeakPtr { *this }](auto&& frame) {
+ backend.setTransformableFrameCallback([transformer = m_transformer, identifier = context->identifier(), backend = Ref { backend }, weakThis = WeakPtr { *this }](auto&& frame) {
auto chunk = frame->data();
if (!chunk.data() || !chunk.size())
return;
@@ -231,13 +231,13 @@
// We do not want to throw any exception in the transform to make sure we do not error the transform.
WTF::switchOn(frame, [&](RefPtr<RTCEncodedAudioFrame>& value) {
- transformFrame(*value, globalObject, transformer.get(), *readableStreamSource, context.contextIdentifier(), weakThis);
+ transformFrame(*value, globalObject, transformer.get(), *readableStreamSource, context.identifier(), weakThis);
}, [&](RefPtr<RTCEncodedVideoFrame>& value) {
- transformFrame(*value, globalObject, transformer.get(), *readableStreamSource, context.contextIdentifier(), weakThis);
+ transformFrame(*value, globalObject, transformer.get(), *readableStreamSource, context.identifier(), weakThis);
}, [&](RefPtr<ArrayBuffer>& value) {
- transformFrame({ static_cast<const uint8_t*>(value->data()), value->byteLength() }, globalObject, transformer.get(), *readableStreamSource, context.contextIdentifier(), weakThis);
+ transformFrame({ static_cast<const uint8_t*>(value->data()), value->byteLength() }, globalObject, transformer.get(), *readableStreamSource, context.identifier(), weakThis);
}, [&](RefPtr<ArrayBufferView>& value) {
- transformFrame({ static_cast<const uint8_t*>(value->data()), value->byteLength() }, globalObject, transformer.get(), *readableStreamSource, context.contextIdentifier(), weakThis);
+ transformFrame({ static_cast<const uint8_t*>(value->data()), value->byteLength() }, globalObject, transformer.get(), *readableStreamSource, context.identifier(), weakThis);
});
return { };
}));
Modified: trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp (286024 => 286025)
--- trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -96,7 +96,7 @@
static void dispatchAlgorithmOperation(WorkQueue& workQueue, ScriptExecutionContext& context, ResultCallbackType&& callback, CryptoAlgorithm::ExceptionCallback&& exceptionCallback, OperationType&& operation)
{
workQueue.dispatch(
- [operation = WTFMove(operation), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), contextIdentifier = context.contextIdentifier()]() mutable {
+ [operation = WTFMove(operation), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), contextIdentifier = context.identifier()]() mutable {
auto result = operation();
ScriptExecutionContext::postTaskTo(contextIdentifier, [result = crossThreadCopy(result), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback)](auto&) mutable {
if (result.hasException()) {
Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.cpp (286024 => 286025)
--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -111,7 +111,7 @@
// This is a special case that can't use dispatchOperation() because it bundles
// the result validation and callback dispatch into unifiedCallback.
workQueue.dispatch(
- [baseKey = WTFMove(baseKey), publicKey = ecParameters.publicKey, length, unifiedCallback = WTFMove(unifiedCallback), contextIdentifier = context.contextIdentifier()]() mutable {
+ [baseKey = WTFMove(baseKey), publicKey = ecParameters.publicKey, length, unifiedCallback = WTFMove(unifiedCallback), contextIdentifier = context.identifier()]() mutable {
auto derivedKey = platformDeriveBits(downcast<CryptoKeyEC>(baseKey.get()), downcast<CryptoKeyEC>(*publicKey));
ScriptExecutionContext::postTaskTo(contextIdentifier, [derivedKey = WTFMove(derivedKey), length, unifiedCallback = WTFMove(unifiedCallback)](auto&) mutable {
unifiedCallback(WTFMove(derivedKey), length);
Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA1.cpp (286024 => 286025)
--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA1.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA1.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -51,7 +51,7 @@
return;
}
- workQueue.dispatch([digest = WTFMove(digest), message = WTFMove(message), callback = WTFMove(callback), contextIdentifier = context.contextIdentifier()]() mutable {
+ workQueue.dispatch([digest = WTFMove(digest), message = WTFMove(message), callback = WTFMove(callback), contextIdentifier = context.identifier()]() mutable {
digest->addBytes(message.data(), message.size());
auto result = digest->computeHash();
ScriptExecutionContext::postTaskTo(contextIdentifier, [callback = WTFMove(callback), result = WTFMove(result)](auto&) {
Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA224.cpp (286024 => 286025)
--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA224.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA224.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -51,7 +51,7 @@
return;
}
- workQueue.dispatch([digest = WTFMove(digest), message = WTFMove(message), callback = WTFMove(callback), contextIdentifier = context.contextIdentifier()]() mutable {
+ workQueue.dispatch([digest = WTFMove(digest), message = WTFMove(message), callback = WTFMove(callback), contextIdentifier = context.identifier()]() mutable {
digest->addBytes(message.data(), message.size());
auto result = digest->computeHash();
ScriptExecutionContext::postTaskTo(contextIdentifier, [callback = WTFMove(callback), result = WTFMove(result)](auto&) {
Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA256.cpp (286024 => 286025)
--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA256.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA256.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -51,7 +51,7 @@
return;
}
- workQueue.dispatch([digest = WTFMove(digest), message = WTFMove(message), callback = WTFMove(callback), contextIdentifier = context.contextIdentifier()]() mutable {
+ workQueue.dispatch([digest = WTFMove(digest), message = WTFMove(message), callback = WTFMove(callback), contextIdentifier = context.identifier()]() mutable {
digest->addBytes(message.data(), message.size());
auto result = digest->computeHash();
ScriptExecutionContext::postTaskTo(contextIdentifier, [callback = WTFMove(callback), result = WTFMove(result)](auto&) {
Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA384.cpp (286024 => 286025)
--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA384.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA384.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -51,7 +51,7 @@
return;
}
- workQueue.dispatch([digest = WTFMove(digest), message = WTFMove(message), callback = WTFMove(callback), contextIdentifier = context.contextIdentifier()]() mutable {
+ workQueue.dispatch([digest = WTFMove(digest), message = WTFMove(message), callback = WTFMove(callback), contextIdentifier = context.identifier()]() mutable {
digest->addBytes(message.data(), message.size());
auto result = digest->computeHash();
ScriptExecutionContext::postTaskTo(contextIdentifier, [callback = WTFMove(callback), result = WTFMove(result)](auto&) {
Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA512.cpp (286024 => 286025)
--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA512.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA512.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -51,7 +51,7 @@
return;
}
- workQueue.dispatch([digest = WTFMove(digest), message = WTFMove(message), callback = WTFMove(callback), contextIdentifier = context.contextIdentifier()]() mutable {
+ workQueue.dispatch([digest = WTFMove(digest), message = WTFMove(message), callback = WTFMove(callback), contextIdentifier = context.identifier()]() mutable {
digest->addBytes(message.data(), message.size());
auto result = digest->computeHash();
ScriptExecutionContext::postTaskTo(contextIdentifier, [callback = WTFMove(callback), result = WTFMove(result)](auto&) {
Modified: trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp (286024 => 286025)
--- trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -277,7 +277,7 @@
__block auto blockCallback(WTFMove(callback));
__block auto blockFailureCallback(WTFMove(failureCallback));
- auto contextIdentifier = context->contextIdentifier();
+ auto contextIdentifier = context->identifier();
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
CCRSACryptorRef ccPublicKey = nullptr;
CCRSACryptorRef ccPrivateKey = nullptr;
Modified: trunk/Source/WebCore/dom/BroadcastChannel.cpp (286024 => 286025)
--- trunk/Source/WebCore/dom/BroadcastChannel.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/dom/BroadcastChannel.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -118,7 +118,7 @@
void BroadcastChannel::MainThreadBridge::registerChannel()
{
- ensureOnMainThread([this, contextIdentifier = m_broadcastChannel->scriptExecutionContext()->contextIdentifier()](auto& document) {
+ ensureOnMainThread([this, contextIdentifier = m_broadcastChannel->scriptExecutionContext()->identifier()](auto& document) {
m_origin = { shouldPartitionOrigin(document) ? document.topOrigin().data() : document.securityOrigin().data(), document.securityOrigin().data() };
if (auto* page = document.page())
page->broadcastChannelRegistry().registerChannel(m_origin, m_name, m_identifier);
Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.cpp (286024 => 286025)
--- trunk/Source/WebCore/dom/ScriptExecutionContext.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -114,17 +114,17 @@
};
ScriptExecutionContext::ScriptExecutionContext()
- : m_contextIdentifier(ScriptExecutionContextIdentifier::generateThreadSafe())
+ : m_identifier(ScriptExecutionContextIdentifier::generateThreadSafe())
{
Locker locker { allScriptExecutionContextsMapLock };
- allScriptExecutionContextsMap().add(m_contextIdentifier, this);
+ allScriptExecutionContextsMap().add(m_identifier, this);
}
void ScriptExecutionContext::removeFromContextsMap()
{
Locker locker { allScriptExecutionContextsMapLock };
- ASSERT(allScriptExecutionContextsMap().contains(m_contextIdentifier));
- allScriptExecutionContextsMap().remove(m_contextIdentifier);
+ ASSERT(allScriptExecutionContextsMap().contains(m_identifier));
+ allScriptExecutionContextsMap().remove(m_identifier);
}
#if !ASSERT_ENABLED
@@ -158,7 +158,7 @@
#if ASSERT_ENABLED
{
Locker locker { allScriptExecutionContextsMapLock };
- ASSERT_WITH_MESSAGE(!allScriptExecutionContextsMap().contains(m_contextIdentifier), "A ScriptExecutionContext subclass instance implementing postTask should have already removed itself from the map");
+ ASSERT_WITH_MESSAGE(!allScriptExecutionContextsMap().contains(m_identifier), "A ScriptExecutionContext subclass instance implementing postTask should have already removed itself from the map");
}
m_inScriptExecutionContextDestructor = true;
Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.h (286024 => 286025)
--- trunk/Source/WebCore/dom/ScriptExecutionContext.h 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.h 2021-11-18 21:28:14 UTC (rev 286025)
@@ -283,9 +283,7 @@
WEBCORE_EXPORT static bool postTaskTo(ScriptExecutionContextIdentifier, Task&&);
WEBCORE_EXPORT static bool ensureOnContextThread(ScriptExecutionContextIdentifier, Task&&);
- // FIXME: Port call sites to identifier() and drop this function.
- ScriptExecutionContextIdentifier contextIdentifier() const { return m_contextIdentifier; }
- ScriptExecutionContextIdentifier identifier() const { return m_contextIdentifier; }
+ ScriptExecutionContextIdentifier identifier() const { return m_identifier; }
protected:
class AddConsoleMessageTask : public Task {
@@ -363,7 +361,7 @@
#endif
String m_domainForCachePartition;
- mutable ScriptExecutionContextIdentifier m_contextIdentifier;
+ mutable ScriptExecutionContextIdentifier m_identifier;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/inspector/agents/worker/ServiceWorkerAgent.cpp (286024 => 286025)
--- trunk/Source/WebCore/inspector/agents/worker/ServiceWorkerAgent.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/inspector/agents/worker/ServiceWorkerAgent.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -57,7 +57,7 @@
Protocol::ErrorStringOr<Ref<Protocol::ServiceWorker::Configuration>> ServiceWorkerAgent::getInitializationInfo()
{
return Protocol::ServiceWorker::Configuration::create()
- .setTargetId(m_serviceWorkerGlobalScope.identifier())
+ .setTargetId(m_serviceWorkerGlobalScope.inspectorIdentifier())
.setSecurityOrigin(m_serviceWorkerGlobalScope.securityOrigin()->toRawString())
.setUrl(m_serviceWorkerGlobalScope.contextData().scriptURL.string())
.setContent(m_serviceWorkerGlobalScope.contextData().script.toString())
Modified: trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm (286024 => 286025)
--- trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm 2021-11-18 21:28:14 UTC (rev 286025)
@@ -178,7 +178,7 @@
continue;
mach_port_t machThread = thread->thread()->machThread();
if (MACH_PORT_VALID(machThread))
- knownWorkerThreads.set(machThread, thread->identifier().isolatedCopy());
+ knownWorkerThreads.set(machThread, thread->inspectorIdentifier().isolatedCopy());
}
}
Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (286024 => 286025)
--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -88,7 +88,7 @@
WorkerGlobalScope::WorkerGlobalScope(WorkerThreadType type, const WorkerParameters& params, Ref<SecurityOrigin>&& origin, WorkerThread& thread, Ref<SecurityOrigin>&& topOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider)
: WorkerOrWorkletGlobalScope(type, isMainThread() ? Ref { commonVM() } : JSC::VM::create(), &thread)
, m_url(params.scriptURL)
- , m_identifier(params.identifier)
+ , m_inspectorIdentifier(params.inspectorIdentifier)
, m_userAgent(params.userAgent)
, m_isOnline(params.isOnline)
, m_shouldBypassMainWorldContentSecurityPolicy(params.shouldBypassMainWorldContentSecurityPolicy)
@@ -103,7 +103,7 @@
{
{
Locker locker { allWorkerGlobalScopeIdentifiersLock };
- allWorkerGlobalScopeIdentifiers().add(contextIdentifier());
+ allWorkerGlobalScopeIdentifiers().add(identifier());
}
if (m_topOrigin->hasUniversalAccess())
@@ -124,7 +124,7 @@
{
Locker locker { allWorkerGlobalScopeIdentifiersLock };
- allWorkerGlobalScopeIdentifiers().remove(contextIdentifier());
+ allWorkerGlobalScopeIdentifiers().remove(identifier());
}
m_performance = nullptr;
Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.h (286024 => 286025)
--- trunk/Source/WebCore/workers/WorkerGlobalScope.h 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.h 2021-11-18 21:28:14 UTC (rev 286025)
@@ -79,7 +79,7 @@
const URL& url() const final { return m_url; }
String origin() const;
- const String& identifier() const { return m_identifier; }
+ const String& inspectorIdentifier() const { return m_inspectorIdentifier; }
IDBClient::IDBConnectionProxy* idbConnectionProxy() final;
void suspend() final;
@@ -177,7 +177,7 @@
String userAgent(const URL&) const final;
EventTarget* errorEventTarget() final;
- String resourceRequestIdentifier() const final { return m_identifier; }
+ String resourceRequestIdentifier() const final { return m_inspectorIdentifier; }
SocketProvider* socketProvider() final;
RefPtr<RTCDataChannelRemoteHandlerConnection> createRTCDataChannelRemoteHandlerConnection() final;
@@ -191,7 +191,7 @@
void stopIndexedDatabase();
URL m_url;
- String m_identifier;
+ String m_inspectorIdentifier;
String m_userAgent;
mutable RefPtr<WorkerLocation> m_location;
Modified: trunk/Source/WebCore/workers/WorkerOrWorkletThread.cpp (286024 => 286025)
--- trunk/Source/WebCore/workers/WorkerOrWorkletThread.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/workers/WorkerOrWorkletThread.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -66,8 +66,8 @@
return makeUniqueRef<WorkerDedicatedRunLoop>();
}
-WorkerOrWorkletThread::WorkerOrWorkletThread(const String& identifier, WorkerThreadMode workerThreadMode)
- : m_identifier(identifier)
+WorkerOrWorkletThread::WorkerOrWorkletThread(const String& inspectorIdentifier, WorkerThreadMode workerThreadMode)
+ : m_inspectorIdentifier(inspectorIdentifier)
, m_runLoop(constructRunLoop(workerThreadMode))
{
Locker locker { workerOrWorkletThreadsLock() };
Modified: trunk/Source/WebCore/workers/WorkerOrWorkletThread.h (286024 => 286025)
--- trunk/Source/WebCore/workers/WorkerOrWorkletThread.h 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/workers/WorkerOrWorkletThread.h 2021-11-18 21:28:14 UTC (rev 286025)
@@ -63,7 +63,7 @@
void suspend();
void resume();
- const String& identifier() const { return m_identifier; }
+ const String& inspectorIdentifier() const { return m_inspectorIdentifier; }
static HashSet<WorkerOrWorkletThread*>& workerOrWorkletThreads() WTF_REQUIRES_LOCK(workerOrWorkletThreadsLock());
static Lock& workerOrWorkletThreadsLock() WTF_RETURNS_LOCK(s_workerOrWorkletThreadsLock);
@@ -70,7 +70,7 @@
static void releaseFastMallocFreeMemoryInAllThreads();
protected:
- explicit WorkerOrWorkletThread(const String& identifier, WorkerThreadMode = WorkerThreadMode::CreateNewThread);
+ explicit WorkerOrWorkletThread(const String& inspectorIdentifier, WorkerThreadMode = WorkerThreadMode::CreateNewThread);
void workerOrWorkletThread();
// Executes the event loop for the worker thread. Derived classes can override to perform actions before/after entering the event loop.
@@ -84,7 +84,7 @@
static Lock s_workerOrWorkletThreadsLock;
- String m_identifier;
+ String m_inspectorIdentifier;
Lock m_threadCreationAndGlobalScopeLock;
RefPtr<WorkerOrWorkletGlobalScope> m_globalScope;
RefPtr<Thread> m_thread;
Modified: trunk/Source/WebCore/workers/WorkerThread.cpp (286024 => 286025)
--- trunk/Source/WebCore/workers/WorkerThread.cpp 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/workers/WorkerThread.cpp 2021-11-18 21:28:14 UTC (rev 286025)
@@ -50,7 +50,7 @@
return {
scriptURL.isolatedCopy(),
name.isolatedCopy(),
- identifier.isolatedCopy(),
+ inspectorIdentifier.isolatedCopy(),
userAgent.isolatedCopy(),
isOnline,
contentSecurityPolicyResponseHeaders,
@@ -87,7 +87,7 @@
}
WorkerThread::WorkerThread(const WorkerParameters& params, const ScriptBuffer& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerDebuggerProxy& workerDebuggerProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const SecurityOrigin& topOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, JSC::RuntimeFlags runtimeFlags)
- : WorkerOrWorkletThread(params.identifier.isolatedCopy(), params.workerThreadMode)
+ : WorkerOrWorkletThread(params.inspectorIdentifier.isolatedCopy(), params.workerThreadMode)
, m_workerLoaderProxy(workerLoaderProxy)
, m_workerDebuggerProxy(workerDebuggerProxy)
, m_workerReportingProxy(workerReportingProxy)
Modified: trunk/Source/WebCore/workers/WorkerThread.h (286024 => 286025)
--- trunk/Source/WebCore/workers/WorkerThread.h 2021-11-18 21:14:07 UTC (rev 286024)
+++ trunk/Source/WebCore/workers/WorkerThread.h 2021-11-18 21:28:14 UTC (rev 286025)
@@ -61,7 +61,7 @@
public:
URL scriptURL;
String name;
- String identifier;
+ String inspectorIdentifier;
String userAgent;
bool isOnline;
ContentSecurityPolicyResponseHeaders contentSecurityPolicyResponseHeaders;