Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use fastMalloc/fastFree in WebCoreArgumentCodersMac.mm
<https://webkit.org/b/213325>

Reviewed by Darin Adler.

* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::createArchiveList):
(IPC::createCFURLRequestFromSerializableRepresentation):


Canonical link: https://commits.webkit.org/226160@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
ddkilzer committed Jun 19, 2020
1 parent 40485d7 commit bb2ba2f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,14 @@
2020-06-18 David Kilzer <ddkilzer@apple.com>

Use fastMalloc/fastFree in WebCoreArgumentCodersMac.mm
<https://webkit.org/b/213325>

Reviewed by Darin Adler.

* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::createArchiveList):
(IPC::createCFURLRequestFromSerializableRepresentation):

2020-06-18 Tim Horton <timothy_horton@apple.com>

Remove some vestiges of the 32-bit Plugin Process
Expand Down
4 changes: 2 additions & 2 deletions Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm
Expand Up @@ -132,7 +132,7 @@ static bool createArchiveList(CFDictionaryRef representation, CFTypeRef tokenNul
return false;

*objectCount = archiveListArrayCount;
*objects = static_cast<CFTypeRef*>(malloc(bufferSize.unsafeGet()));
*objects = static_cast<CFTypeRef*>(fastMalloc(bufferSize.unsafeGet()));

CFArrayGetValues(archiveListArray, CFRangeMake(0, *objectCount), *objects);
for (CFIndex i = 0; i < *objectCount; ++i) {
Expand Down Expand Up @@ -171,7 +171,7 @@ static bool createArchiveList(CFDictionaryRef representation, CFTypeRef tokenNul
return nullptr;

auto cfRequest = adoptCF(_CFURLRequestCreateFromArchiveList(kCFAllocatorDefault, version, objects, objectCount, protocolProperties));
free(objects);
fastFree(objects);
return WTFMove(cfRequest);
}

Expand Down

0 comments on commit bb2ba2f

Please sign in to comment.