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

Side by Side Diff: runtime/platform/assert.cc

Issue 9209001: Move utils.h and utils.cc from runtime/vm to runtime/platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addresed new comments from ager@ Created 8 years, 11 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 | « client/dom/generated/src/interface/TextMetrics.dart ('k') | runtime/platform/globals.h » ('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 <cstdlib> 5 #include <cstdlib>
6 #include <sstream> 6 #include <sstream>
7 #include <string> 7 #include <string>
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/globals.h" 10 #include "platform/globals.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 // Exit with a failure code when we miss an EXPECT check. 14 // Exit with a failure code when we miss an EXPECT check.
15 static void failed_exit(void) { 15 static void failed_exit(void) {
16 exit(255); 16 exit(255);
17 } 17 }
18 18
19 void DynamicAssertionHelper::Fail(const char* format, ...) { 19 void DynamicAssertionHelper::Fail(const char* format, ...) {
20 std::stringstream stream; 20 std::stringstream stream;
(...skipping 19 matching lines...) Expand all
40 std::abort(); 40 std::abort();
41 } 41 }
42 static bool failed = false; 42 static bool failed = false;
43 if (!failed) { 43 if (!failed) {
44 std::atexit(&failed_exit); 44 std::atexit(&failed_exit);
45 } 45 }
46 failed = true; 46 failed = true;
47 } 47 }
48 48
49 } // namespace dart 49 } // namespace dart
OLDNEW
« no previous file with comments | « client/dom/generated/src/interface/TextMetrics.dart ('k') | runtime/platform/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698