Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(654)

Unified Diff: runtime/platform/thread_win.cc

Issue 22927012: Add Windows error code reporting printing format fix in runtime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/thread_win.cc
diff --git a/runtime/platform/thread_win.cc b/runtime/platform/thread_win.cc
index 7b3ca56cb205d2d5569596ab6e0ee998432f8c3e..e8be678cb6d0a1563aa38995f136ea9821cd4c91 100644
--- a/runtime/platform/thread_win.cc
+++ b/runtime/platform/thread_win.cc
@@ -140,7 +140,7 @@ bool Mutex::TryLock() {
void Mutex::Unlock() {
BOOL result = ReleaseSemaphore(data_.semaphore_, 1, NULL);
if (result == 0) {
- FATAL1("Mutex unlock failed", GetLastError());
+ FATAL1("Mutex unlock failed %d", GetLastError());
}
}
@@ -244,7 +244,7 @@ void MonitorData::SignalAndRemoveFirstWaiter() {
// Signal event.
BOOL result = SetEvent(first->event_);
if (result == 0) {
- FATAL1("Monitor::Notify failed to signal event", GetLastError());
+ FATAL1("Monitor::Notify failed to signal event %d", GetLastError());
}
}
LeaveCriticalSection(&waiters_cs_);
@@ -261,7 +261,7 @@ void MonitorData::SignalAndRemoveAllWaiters() {
while (current != NULL) {
BOOL result = SetEvent(current->event_);
if (result == 0) {
- FATAL1("Failed to set event for NotifyAll", GetLastError());
+ FATAL1("Failed to set event for NotifyAll %d", GetLastError());
}
current = current->next_;
}
@@ -315,14 +315,14 @@ Monitor::WaitResult Monitor::Wait(int64_t millis) {
// Wait forever for a Notify or a NotifyAll event.
result = WaitForSingleObject(wait_data->event_, INFINITE);
if (result == WAIT_FAILED) {
- FATAL1("Monitor::Wait failed", GetLastError());
+ FATAL1("Monitor::Wait failed %d", GetLastError());
}
} else {
// Wait for the given period of time for a Notify or a NotifyAll
// event.
result = WaitForSingleObject(wait_data->event_, millis);
if (result == WAIT_FAILED) {
- FATAL1("Monitor::Wait with timeout failed", GetLastError());
+ FATAL1("Monitor::Wait with timeout failed %d", GetLastError());
}
if (result == WAIT_TIMEOUT) {
// No longer waiting. Remove from the list of waiters.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698