Ignore:
Timestamp:
May 23, 2021, 1:33:29 PM (4 years ago)
Author:
Chris Dumez
Message:

Use CheckedLock in even more places
https://bugs.webkit.org/show_bug.cgi?id=226152

Reviewed by Darin Adler.

Use CheckedLock in even more places to benefit from Clang Thread Safety Analysis.

Source/JavaScriptCore:

  • API/JSVirtualMachine.mm:

(WTF_REQUIRES_LOCK):

  • API/glib/JSCVirtualMachine.cpp:
  • bytecode/StructureStubInfo.h:
  • bytecode/SuperSampler.cpp:
  • dfg/DFGCommonData.cpp:

(JSC::DFG::CommonData::invalidate):
(JSC::DFG::CommonData::~CommonData):
(JSC::DFG::CommonData::installVMTrapBreakpoints):
(JSC::DFG::codeBlockForVMTrapPC):

  • dfg/DFGPlan.h:

(JSC::DFG::Plan::WTF_GUARDED_BY_LOCK):

  • disassembler/Disassembler.cpp:
  • heap/BlockDirectory.cpp:

(JSC::BlockDirectory::parallelNotEmptyBlockSource):

  • heap/Heap.h:
  • heap/IsoSubspacePerVM.h:
  • inspector/remote/socket/RemoteInspectorConnectionClient.h:

Source/WebCore:

  • platform/image-decoders/ScalableImageDecoder.cpp:

(WebCore::ScalableImageDecoder::frameIsCompleteAtIndex const):
(WebCore::ScalableImageDecoder::frameHasAlphaAtIndex const):
(WebCore::ScalableImageDecoder::frameBytesAtIndex const):
(WebCore::ScalableImageDecoder::frameDurationAtIndex const):
(WebCore::ScalableImageDecoder::createFrameImageAtIndex):

  • platform/image-decoders/ScalableImageDecoder.h:
  • platform/mediarecorder/MediaRecorderPrivateMock.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeOutgoingAudioSource.h:
  • platform/mediastream/RealtimeOutgoingVideoSource.h:
  • platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:

(WebCore::RealtimeOutgoingAudioSourceLibWebRTC::audioSamplesAvailable):
(WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData):

  • platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.h:
  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/sql/SQLiteDatabase.h:
  • worklets/PaintWorkletGlobalScope.h:

Source/WebKit:

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • NetworkProcess/glib/DNSCache.h:
  • Shared/mac/MediaFormatReader/MediaSampleCursor.cpp:

(WebKit::MediaSampleCursor::locateIterator const):
(WebKit::MediaSampleCursor::locateMediaSample const):
(WebKit::MediaSampleCursor::locateTiming const):
(WebKit::MediaSampleCursor::stepInOrderedMap):
(WebKit::MediaSampleCursor::stepInPresentationTime):
(WebKit::MediaSampleCursor::getMediaSample const):
(WebKit::MediaSampleCursor::getTiming const):
(WebKit::MediaSampleCursor::getPlayableHorizon const):

  • Shared/mac/MediaFormatReader/MediaSampleCursor.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSVirtualMachine.mm

    r277909 r277934  
    3939#import "SlotVisitorInlines.h"
    4040#import <mutex>
    41 #import <wtf/Lock.h>
     41#import <wtf/CheckedLock.h>
    4242#import <wtf/RetainPtr.h>
    4343
    4444static NSMapTable *globalWrapperCache = 0;
    4545
    46 static Lock wrapperCacheMutex;
     46static CheckedLock wrapperCacheMutex;
    4747
    4848static void initWrapperCache()
     
    5454}
    5555
    56 static NSMapTable *wrapperCache()
     56static NSMapTable *wrapperCache() WTF_REQUIRES_LOCK(wrapperCacheMutex)
    5757{
    5858    if (!globalWrapperCache)
Note: See TracChangeset for help on using the changeset viewer.