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

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

Issue 12451004: Introduce ZLibInflater and ZLibDeflater to dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
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 "bin/extensions.h" 7 #include "bin/extensions.h"
8 #include "bin/directory.h" 8 #include "bin/directory.h"
9 #include "bin/file.h" 9 #include "bin/file.h"
10 #include "bin/io_buffer.h" 10 #include "bin/io_buffer.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 } 523 }
524 524
525 525
526 Dart_Handle DartUtils::NewDartArgumentError(const char* message) { 526 Dart_Handle DartUtils::NewDartArgumentError(const char* message) {
527 return NewDartExceptionWithMessage(kCoreLibURL, 527 return NewDartExceptionWithMessage(kCoreLibURL,
528 "ArgumentError", 528 "ArgumentError",
529 message); 529 message);
530 } 530 }
531 531
532 532
533 Dart_Handle DartUtils::NewInternalError(const char* message) {
534 return NewDartExceptionWithMessage(kCoreLibURL, "InternalError", message);
535 }
536
537
533 void DartUtils::SetOriginalWorkingDirectory() { 538 void DartUtils::SetOriginalWorkingDirectory() {
534 original_working_directory = Directory::Current(); 539 original_working_directory = Directory::Current();
535 } 540 }
536 541
537 542
538 // Statically allocated Dart_CObject instances for immutable 543 // Statically allocated Dart_CObject instances for immutable
539 // objects. As these will be used by different threads the use of 544 // objects. As these will be used by different threads the use of
540 // these depends on the fact that the marking internally in the 545 // these depends on the fact that the marking internally in the
541 // Dart_CObject structure is not marking simple value objects. 546 // Dart_CObject structure is not marking simple value objects.
542 Dart_CObject CObject::api_null_ = { Dart_CObject::kNull , { 0 } }; 547 Dart_CObject CObject::api_null_ = { Dart_CObject::kNull , { 0 } };
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 694
690 CObject* CObject::NewOSError(OSError* os_error) { 695 CObject* CObject::NewOSError(OSError* os_error) {
691 CObject* error_message = 696 CObject* error_message =
692 new CObjectString(CObject::NewString(os_error->message())); 697 new CObjectString(CObject::NewString(os_error->message()));
693 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); 698 CObjectArray* result = new CObjectArray(CObject::NewArray(3));
694 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); 699 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError)));
695 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); 700 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code())));
696 result->SetAt(2, error_message); 701 result->SetAt(2, error_message);
697 return result; 702 return result;
698 } 703 }
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/filter.h » ('j') | runtime/bin/filter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698