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

Side by Side Diff: runtime/bin/dartutils.cc

Issue 23875023: Fix http://dartbug.com/13297 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/bin/dartutils.h ('k') | runtime/bin/main.cc » ('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 "bin/dartutils.h" 5 #include "bin/dartutils.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 9
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 message, 837 message,
838 os_error); 838 os_error);
839 } 839 }
840 840
841 841
842 Dart_Handle DartUtils::NewInternalError(const char* message) { 842 Dart_Handle DartUtils::NewInternalError(const char* message) {
843 return NewDartExceptionWithMessage(kCoreLibURL, "_InternalError", message); 843 return NewDartExceptionWithMessage(kCoreLibURL, "_InternalError", message);
844 } 844 }
845 845
846 846
847 void DartUtils::SetOriginalWorkingDirectory() { 847 bool DartUtils::SetOriginalWorkingDirectory() {
848 original_working_directory = Directory::Current(); 848 original_working_directory = Directory::Current();
849 return original_working_directory != NULL;
849 } 850 }
850 851
851 852
852 // Statically allocated Dart_CObject instances for immutable 853 // Statically allocated Dart_CObject instances for immutable
853 // objects. As these will be used by different threads the use of 854 // objects. As these will be used by different threads the use of
854 // these depends on the fact that the marking internally in the 855 // these depends on the fact that the marking internally in the
855 // Dart_CObject structure is not marking simple value objects. 856 // Dart_CObject structure is not marking simple value objects.
856 Dart_CObject CObject::api_null_ = { Dart_CObject_kNull , { 0 } }; 857 Dart_CObject CObject::api_null_ = { Dart_CObject_kNull , { 0 } };
857 Dart_CObject CObject::api_true_ = { Dart_CObject_kBool , { true } }; 858 Dart_CObject CObject::api_true_ = { Dart_CObject_kBool , { true } };
858 Dart_CObject CObject::api_false_ = { Dart_CObject_kBool, { false } }; 859 Dart_CObject CObject::api_false_ = { Dart_CObject_kBool, { false } };
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 new CObjectString(CObject::NewString(os_error->message())); 1012 new CObjectString(CObject::NewString(os_error->message()));
1012 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); 1013 CObjectArray* result = new CObjectArray(CObject::NewArray(3));
1013 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); 1014 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError)));
1014 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); 1015 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code())));
1015 result->SetAt(2, error_message); 1016 result->SetAt(2, error_message);
1016 return result; 1017 return result;
1017 } 1018 }
1018 1019
1019 } // namespace bin 1020 } // namespace bin
1020 } // namespace dart 1021 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698