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

Side by Side Diff: runtime/vm/version_in.cc

Issue 558503002: Checks snapshot validity using a hash of source file instead of a version string. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 | « runtime/vm/version.h ('k') | tools/make_version.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "vm/version.h" 5 #include "vm/version.h"
6 6
7 #include "vm/cpu.h" 7 #include "vm/cpu.h"
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 10 matching lines...) Expand all
21 intptr_t len = OS::SNPrint(NULL, 0, format, str_, os, arch); 21 intptr_t len = OS::SNPrint(NULL, 0, format, str_, os, arch);
22 char* buffer = reinterpret_cast<char*>(malloc(len + 1)); 22 char* buffer = reinterpret_cast<char*>(malloc(len + 1));
23 OS::SNPrint(buffer, (len + 1), format, str_, os, arch); 23 OS::SNPrint(buffer, (len + 1), format, str_, os, arch);
24 formatted_version = buffer; 24 formatted_version = buffer;
25 } 25 }
26 return formatted_version; 26 return formatted_version;
27 } 27 }
28 28
29 29
30 const char* Version::SnapshotString() { 30 const char* Version::SnapshotString() {
31 return str_; 31 return snapshot_hash_;
32 } 32 }
33 33
34 34 const char* Version::snapshot_hash_ = "{{SNAPSHOT_HASH}}";
35 const char* Version::str_ = "{{VERSION_STR}} ({{BUILD_TIME}})"; 35 const char* Version::str_ = "{{VERSION_STR}} ({{BUILD_TIME}})";
36 36
37 } // namespace dart 37 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/version.h ('k') | tools/make_version.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698