Bug 20566
Summary: | FastMalloc should be called instead of malloc | ||
---|---|---|---|
Product: | WebKit | Reporter: | Gabriella Toth <gtoth> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Minor | CC: | mrowe |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | All |
Gabriella Toth
We found 18 malloc or free invocations and we think they should be changed to FastMalloc or FastFree (according to bug 19287, comment 3).
These invocations can be found in the following path at revision 35986:
WebCore/bridge/c/c_instance.cpp: line 196
WebCore/editing/TextIterator.cpp: line 1323
WebCore/editing/TextIterator.cpp: line 1340
WebCore/editing/TextIterator.cpp: line 1361
WebCore/editing/TextIterator.cpp: line 1374
WebCore/plugins/PluginStream.cpp: line 86
WebCore/bridge/NP_jsobject.cpp: line 56
WebCore/bridge/NP_jsobject.cpp: line 69
WebCore/bridge/NP_jsobject.cpp: line 394
WebCore/bridge/npruntime.cpp: line 73
WebCore/bridge/npruntime.cpp: line 106
WebCore/bridge/npruntime.cpp: line 115
WebCore/bridge/npruntime.cpp: line 153
WebCore/bridge/npruntime.cpp: line 165
WebCore/bridge/npruntime.cpp: line 182
WebCore/bridge/npruntime.cpp: line 222
WebCore/plugins/npapi.cpp: line 48
WebCore/plugins/npapi.cpp: line 53
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Mark Rowe (bdash)
If you look at the comments in WebCore/editing/TextIterator.cpp, you'll see that the use of system alloc is intentional.
Many of the calls to malloc and free in the NPAPI-related code have this comment associated with them:
// FIXME: This should really call NPN_MemAlloc but that's in WebKit
NPN_MemAlloc would need to be made accessible from WebCore on the Mac before these cases can be changed.
Gabriella Toth
Ok. It can be closed.