OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 tzinfo_.StandardDate.wDay = 5; | 400 tzinfo_.StandardDate.wDay = 5; |
401 tzinfo_.StandardDate.wHour = 3; | 401 tzinfo_.StandardDate.wHour = 3; |
402 tzinfo_.StandardBias = 0; | 402 tzinfo_.StandardBias = 0; |
403 tzinfo_.DaylightDate.wMonth = 3; | 403 tzinfo_.DaylightDate.wMonth = 3; |
404 tzinfo_.DaylightDate.wDay = 5; | 404 tzinfo_.DaylightDate.wDay = 5; |
405 tzinfo_.DaylightDate.wHour = 2; | 405 tzinfo_.DaylightDate.wHour = 2; |
406 tzinfo_.DaylightBias = -60; | 406 tzinfo_.DaylightBias = -60; |
407 } | 407 } |
408 | 408 |
409 // Make standard and DST timezone names. | 409 // Make standard and DST timezone names. |
410 OS::SNPrintF(Vector<char>(std_tz_name_, kTzNameSize), | 410 WideCharToMultiByte(CP_UTF8, 0, tzinfo_.StandardName, -1, |
411 "%S", | 411 std_tz_name_, kTzNameSize, NULL, NULL); |
412 tzinfo_.StandardName); | |
413 std_tz_name_[kTzNameSize - 1] = '\0'; | 412 std_tz_name_[kTzNameSize - 1] = '\0'; |
414 OS::SNPrintF(Vector<char>(dst_tz_name_, kTzNameSize), | 413 WideCharToMultiByte(CP_UTF8, 0, tzinfo_.DaylightName, -1, |
415 "%S", | 414 dst_tz_name_, kTzNameSize, NULL, NULL); |
416 tzinfo_.DaylightName); | |
417 dst_tz_name_[kTzNameSize - 1] = '\0'; | 415 dst_tz_name_[kTzNameSize - 1] = '\0'; |
418 | 416 |
419 // If OS returned empty string or resource id (like "@tzres.dll,-211") | 417 // If OS returned empty string or resource id (like "@tzres.dll,-211") |
420 // simply guess the name from the UTC bias of the timezone. | 418 // simply guess the name from the UTC bias of the timezone. |
421 // To properly resolve the resource identifier requires a library load, | 419 // To properly resolve the resource identifier requires a library load, |
422 // which is not possible in a sandbox. | 420 // which is not possible in a sandbox. |
423 if (std_tz_name_[0] == '\0' || std_tz_name_[0] == '@') { | 421 if (std_tz_name_[0] == '\0' || std_tz_name_[0] == '@') { |
424 OS::SNPrintF(Vector<char>(std_tz_name_, kTzNameSize - 1), | 422 OS::SNPrintF(Vector<char>(std_tz_name_, kTzNameSize - 1), |
425 "%s Standard Time", | 423 "%s Standard Time", |
426 GuessTimezoneNameFromBias(tzinfo_.Bias)); | 424 GuessTimezoneNameFromBias(tzinfo_.Bias)); |
(...skipping 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2012 | 2010 |
2013 void Sampler::Stop() { | 2011 void Sampler::Stop() { |
2014 ASSERT(IsActive()); | 2012 ASSERT(IsActive()); |
2015 SamplerThread::RemoveActiveSampler(this); | 2013 SamplerThread::RemoveActiveSampler(this); |
2016 SetActive(false); | 2014 SetActive(false); |
2017 } | 2015 } |
2018 | 2016 |
2019 #endif // ENABLE_LOGGING_AND_PROFILING | 2017 #endif // ENABLE_LOGGING_AND_PROFILING |
2020 | 2018 |
2021 } } // namespace v8::internal | 2019 } } // namespace v8::internal |
OLD | NEW |