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

Side by Side Diff: src/runtime.cc

Issue 197023002: Fix a race in initialization of timezone cache in platform-win32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix CE Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/platform-win32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 9565 matching lines...) Expand 10 before | Expand all | Expand 10 after
9576 return isolate->heap()->null_value(); 9576 return isolate->heap()->null_value();
9577 } 9577 }
9578 } 9578 }
9579 9579
9580 9580
9581 RUNTIME_FUNCTION(MaybeObject*, Runtime_DateLocalTimezone) { 9581 RUNTIME_FUNCTION(MaybeObject*, Runtime_DateLocalTimezone) {
9582 SealHandleScope shs(isolate); 9582 SealHandleScope shs(isolate);
9583 ASSERT(args.length() == 1); 9583 ASSERT(args.length() == 1);
9584 9584
9585 CONVERT_DOUBLE_ARG_CHECKED(x, 0); 9585 CONVERT_DOUBLE_ARG_CHECKED(x, 0);
9586 int64_t time = isolate->date_cache()->EquivalentTime(static_cast<int64_t>(x)); 9586 const char* zone =
9587 const char* zone = OS::LocalTimezone(static_cast<double>(time)); 9587 isolate->date_cache()->LocalTimezone(static_cast<int64_t>(x));
9588 return isolate->heap()->AllocateStringFromUtf8(CStrVector(zone)); 9588 return isolate->heap()->AllocateStringFromUtf8(CStrVector(zone));
9589 } 9589 }
9590 9590
9591 9591
9592 RUNTIME_FUNCTION(MaybeObject*, Runtime_DateToUTC) { 9592 RUNTIME_FUNCTION(MaybeObject*, Runtime_DateToUTC) {
9593 SealHandleScope shs(isolate); 9593 SealHandleScope shs(isolate);
9594 ASSERT(args.length() == 1); 9594 ASSERT(args.length() == 1);
9595 9595
9596 CONVERT_DOUBLE_ARG_CHECKED(x, 0); 9596 CONVERT_DOUBLE_ARG_CHECKED(x, 0);
9597 int64_t time = isolate->date_cache()->ToUTC(static_cast<int64_t>(x)); 9597 int64_t time = isolate->date_cache()->ToUTC(static_cast<int64_t>(x));
(...skipping 5376 matching lines...) Expand 10 before | Expand all | Expand 10 after
14974 // Handle last resort GC and make sure to allow future allocations 14974 // Handle last resort GC and make sure to allow future allocations
14975 // to grow the heap without causing GCs (if possible). 14975 // to grow the heap without causing GCs (if possible).
14976 isolate->counters()->gc_last_resort_from_js()->Increment(); 14976 isolate->counters()->gc_last_resort_from_js()->Increment();
14977 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14977 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14978 "Runtime::PerformGC"); 14978 "Runtime::PerformGC");
14979 } 14979 }
14980 } 14980 }
14981 14981
14982 14982
14983 } } // namespace v8::internal 14983 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-win32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698