We currently call it from many threads, but it's not thread safe ...
Created attachment 318196 [details] patch
Attachment 318196 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/VM.h:574: The parameter name "size" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 318196 [details] patch r=me
Comment on attachment 318196 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=318196&action=review r=me with issues resolved. > Source/JavaScriptCore/runtime/VM.cpp:1025 > + ScratchBuffer* newBuffer = ScratchBuffer::create(m_sizeOfLastScratchBuffer); Make sure that the newly allocated buffer's activeLength is set to 0. I'm not sure it's an issue, but I'm thinking of GC scanning it incorrectly if the active length is not set.
Comment on attachment 318196 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=318196&action=review >> Source/JavaScriptCore/runtime/VM.cpp:1025 >> + ScratchBuffer* newBuffer = ScratchBuffer::create(m_sizeOfLastScratchBuffer); > > Make sure that the newly allocated buffer's activeLength is set to 0. I'm not sure it's an issue, but I'm thinking of GC scanning it incorrectly if the active length is not set. ScratchBuffer() already sets it to zero
landed in: https://trac.webkit.org/changeset/220777/webkit
<rdar://problem/33907882>