Commit 25be9fa3 authored by antonm@chromium.org's avatar antonm@chromium.org

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
parent 1e744a30
......@@ -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';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment