[Webkit-unassigned] [Bug 19287] return value of malloc() is not checked in npruntime.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 15 06:43:25 PST 2008


https://bugs.webkit.org/show_bug.cgi?id=19287





------- Comment #9 from darin at apple.com  2008-12-15 06:43 PDT -------
We want to avoid having to sprinkle CRASH calls all around the project, so if
we can use fastMalloc or new that would be considerably more elegant.

For PrivateIdentifier, new would be just fine. There's no need to call malloc
there.

For UTF8Characters I think we're stuck with malloc because, for example, I see
code in testbindings.cpp setting UTF8Characters by calling strdup. I don't
think we're free to use a malloc other than the system malloc in that case.

There are also invocations of strdup, and the issue of failure handling is no
different for strdup than for malloc. I think I see at least one case where
someone expects to use strdup to allocate and then the caller will free with
either NPN_Free or free, so I think we can't change those to fastMalloc.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list