Index: chrome/renderer/mock_printer.cc |
diff --git a/chrome/renderer/mock_printer.cc b/chrome/renderer/mock_printer.cc |
index ac2c77994cde1240d97284b08aa7c46a97c84bbe..4168178316152a31677570adaab37ba2861686e2 100644 |
--- a/chrome/renderer/mock_printer.cc |
+++ b/chrome/renderer/mock_printer.cc |
@@ -98,10 +98,17 @@ void MockPrinter::ScriptedPrint(int cookie, |
} |
void MockPrinter::UpdateSettings(int cookie, |
- PrintMsg_PrintPages_Params* params) { |
+ PrintMsg_PrintPages_Params* params, |
+ const std::vector<int>& pages) { |
EXPECT_EQ(document_cookie_, cookie); |
memset(params, 0, sizeof(PrintMsg_PrintPages_Params)); |
Chris Guillory
2011/08/16 20:08:53
Looking at this further I think line is your issue
kmadhusu
2011/08/16 20:53:21
hmm.. interesting.. I tested without the memset li
|
+ // On Release version, MSVS crashes the application if we try to assign an |
+ // empty vector to an empty vector. Always check for empty vector before |
+ // assigning it to another vector. |
+ if (pages.size() != 0) |
+ params->pages = pages; |
+ |
SetPrintParams(&(params->params)); |
printer_status_ = PRINTER_PRINTING; |
} |