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

Side by Side Diff: runtime/bin/platform_win.cc

Issue 8662006: Fix a number of issues with the process handling (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "bin/platform.h" 5 #include "bin/platform.h"
6 6
7 7
8 bool Platform::Initialize() {
9 // Nothing to do on Windows.
10 return true;
11 }
12
13
8 int Platform::NumberOfProcessors() { 14 int Platform::NumberOfProcessors() {
9 SYSTEM_INFO info; 15 SYSTEM_INFO info;
10 GetSystemInfo(&info); 16 GetSystemInfo(&info);
11 return info.dwNumberOfProcessors; 17 return info.dwNumberOfProcessors;
12 } 18 }
13 19
14 20
15 const char* Platform::OperatingSystem() { 21 const char* Platform::OperatingSystem() {
16 return "windows"; 22 return "windows";
17 } 23 }
(...skipping 20 matching lines...) Expand all
38 // null termination. 44 // null termination.
39 if (message_size > 2 && 45 if (message_size > 2 &&
40 error[message_size - 2] == '\r' && 46 error[message_size - 2] == '\r' &&
41 error[message_size - 1] == '\n') { 47 error[message_size - 1] == '\n') {
42 error[message_size - 2] = '\0'; 48 error[message_size - 2] = '\0';
43 } else { 49 } else {
44 error[kBufferSize - 1] = '\0'; 50 error[kBufferSize - 1] = '\0';
45 } 51 }
46 return error; 52 return error;
47 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698