| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_WINDOWS) | 6 #if defined(TARGET_OS_WINDOWS) |
| 7 | 7 |
| 8 #include "bin/extensions.h" | 8 #include "bin/extensions.h" |
| 9 #include "bin/utils.h" | 9 #include "bin/utils.h" |
| 10 #include "bin/utils_win.h" | 10 #include "bin/utils_win.h" |
| 11 | 11 |
| 12 namespace dart { | 12 namespace dart { |
| 13 namespace bin { | 13 namespace bin { |
| 14 | 14 |
| 15 const char* kPrecompiledVMIsolateSymbolName = "_kVmIsolateSnapshot"; | 15 const char* kVmSnapshotDataSymbolName = "_kDartVmSnapshotData"; |
| 16 const char* kPrecompiledIsolateSymbolName = "_kIsolateSnapshot"; | 16 const char* kVmSnapshotInstructionsSymbolName = "_kDartVmSnapshotInstructions"; |
| 17 const char* kPrecompiledInstructionsSymbolName = "_kInstructionsSnapshot"; | 17 const char* kIsolateSnapshotDataSymbolName = "_kDartIsolateSnapshotData"; |
| 18 const char* kPrecompiledDataSymbolName = "_kDataSnapshot"; | 18 const char* kIsolateSnapshotInstructionsSymbolName = |
| 19 "_kDartIsolateSnapshotInstructions"; |
| 19 | 20 |
| 20 void* Extensions::LoadExtensionLibrary(const char* library_file) { | 21 void* Extensions::LoadExtensionLibrary(const char* library_file) { |
| 21 SetLastError(0); | 22 SetLastError(0); |
| 22 | 23 |
| 23 // Convert to wchar_t string. | 24 // Convert to wchar_t string. |
| 24 int name_len = MultiByteToWideChar(CP_UTF8, 0, library_file, -1, NULL, 0); | 25 int name_len = MultiByteToWideChar(CP_UTF8, 0, library_file, -1, NULL, 0); |
| 25 wchar_t* name; | 26 wchar_t* name; |
| 26 name = new wchar_t[name_len]; | 27 name = new wchar_t[name_len]; |
| 27 MultiByteToWideChar(CP_UTF8, 0, library_file, -1, name, name_len); | 28 MultiByteToWideChar(CP_UTF8, 0, library_file, -1, name, name_len); |
| 28 | 29 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 42 OSError err; | 43 OSError err; |
| 43 return Dart_NewApiError(err.message()); | 44 return Dart_NewApiError(err.message()); |
| 44 } | 45 } |
| 45 return Dart_Null(); | 46 return Dart_Null(); |
| 46 } | 47 } |
| 47 | 48 |
| 48 } // namespace bin | 49 } // namespace bin |
| 49 } // namespace dart | 50 } // namespace dart |
| 50 | 51 |
| 51 #endif // defined(TARGET_OS_WINDOWS) | 52 #endif // defined(TARGET_OS_WINDOWS) |
| OLD | NEW |