Fix windows build.

SmartPointer doesn't have -> operator and conversion to bool.

This a quick fix, I'll try to add -> operator with a separate CL.

TBR=mnaganov@chromium.org

Review URL: http://codereview.chromium.org/1969005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
antonm@chromium.org 2010-05-05 12:39:21 +00:00
parent 1e744a3011
commit 25be9fa35c

View File

@ -1251,10 +1251,10 @@ int OS::StackWalk(Vector<OS::StackFrame> frames) {
DWORD64 symbol_displacement;
SmartPointer<IMAGEHLP_SYMBOL64> symbol(
NewArray<IMAGEHLP_SYMBOL64>(kStackWalkMaxNameLen));
if (!symbol) return kStackWalkError; // Out of memory.
if (symbol.is_empty()) return kStackWalkError; // Out of memory.
memset(*symbol, 0, sizeof(IMAGEHLP_SYMBOL64) + kStackWalkMaxNameLen);
symbol->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64);
symbol->MaxNameLength = kStackWalkMaxNameLen;
(*symbol)->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64);
(*symbol)->MaxNameLength = kStackWalkMaxNameLen;
ok = _SymGetSymFromAddr64(process_handle, // hProcess
stack_frame.AddrPC.Offset, // Address
&symbol_displacement, // Displacement
@ -1276,13 +1276,13 @@ int OS::StackWalk(Vector<OS::StackFrame> frames) {
SNPrintF(MutableCStrVector(frames[frames_count].text,
kStackWalkMaxTextLen),
"%s %s:%d:%d",
symbol->Name, Line.FileName, Line.LineNumber,
(*symbol)->Name, Line.FileName, Line.LineNumber,
line_displacement);
} else {
SNPrintF(MutableCStrVector(frames[frames_count].text,
kStackWalkMaxTextLen),
"%s",
symbol->Name);
(*symbol)->Name);
}
// Make sure line termination is in place.
frames[frames_count].text[kStackWalkMaxTextLen - 1] = '\0';