[webkit-reviews] review requested: [Bug 69018] add more stack dumping methods : [Attachment 109057] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 29 08:07:05 PDT 2011


Gavin Peters <gavinp at chromium.org> has asked  for review:
Bug 69018: add more stack dumping methods
https://bugs.webkit.org/show_bug.cgi?id=69018

Attachment 109057: Patch
https://bugs.webkit.org/attachment.cgi?id=109057&action=review

------- Additional Comments from Gavin Peters <gavinp at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=109057&action=review


I've redone it to make the memory allocation much more clear.

>> Source/JavaScriptCore/wtf/Assertions.cpp:169
>> +void WTFSaveBacktrace(void** stack, int* size)
> 
> "WTFGetBacktrace" is a better name to indicate and out parameter.

Yes, it is.  Done.

>> Source/JavaScriptCore/wtf/Assertions.cpp:193
>> +	    char* mallocedName = (char*) malloc(strlen(mangledName)+1);
> 
> Please use fastMalloc instead of malloc. Please use C++ cast instead of C
cast.

Hrm.  The only reason to use malloc() here is for paralellism with
abi::__cxa_demangle() which is going to use malloc no matter what.  So now I'd
have to make a copy, and if i'm not mistaken, OwnPtr/PassOwnPtr use delete and
not fastFree or delete[].  So I'm going to a WTFString instead.  Let me know
what you think.


More information about the webkit-reviews mailing list