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

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

Issue 12192003: Revert "Revert "Revert "Use browsers JSON.parse for parsing JSON.""" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/json_patch.dart » ('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 "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"
11 #include "include/dart_api.h" 11 #include "include/dart_api.h"
12 #include "platform/assert.h" 12 #include "platform/assert.h"
13 #include "platform/globals.h" 13 #include "platform/globals.h"
14 14
15 const char* DartUtils::original_working_directory = NULL; 15 const char* DartUtils::original_working_directory = NULL;
16 const char* DartUtils::kDartScheme = "dart:"; 16 const char* DartUtils::kDartScheme = "dart:";
17 const char* DartUtils::kDartExtensionScheme = "dart-ext:"; 17 const char* DartUtils::kDartExtensionScheme = "dart-ext:";
18 const char* DartUtils::kASyncLibURL = "dart:async"; 18 const char* DartUtils::kASyncLibURL = "dart:async";
19 const char* DartUtils::kBuiltinLibURL = "dart:builtin"; 19 const char* DartUtils::kBuiltinLibURL = "dart:builtin";
20 const char* DartUtils::kCoreLibURL = "dart:core"; 20 const char* DartUtils::kCoreLibURL = "dart:core";
21 const char* DartUtils::kCryptoLibURL = "dart:crypto"; 21 const char* DartUtils::kCryptoLibURL = "dart:crypto";
22 const char* DartUtils::kIOLibURL = "dart:io"; 22 const char* DartUtils::kIOLibURL = "dart:io";
23 const char* DartUtils::kIOLibPatchURL = "dart:io-patch"; 23 const char* DartUtils::kIOLibPatchURL = "dart:io-patch";
24 const char* DartUtils::kJsonLibURL = "dart:json"; 24 const char* DartUtils::kJsonLibURL = "dart:json";
25 const char* DartUtils::kJsonLibPatchURL = "dart:json-patch";
26 const char* DartUtils::kUriLibURL = "dart:uri"; 25 const char* DartUtils::kUriLibURL = "dart:uri";
27 const char* DartUtils::kUtfLibURL = "dart:utf"; 26 const char* DartUtils::kUtfLibURL = "dart:utf";
28 const char* DartUtils::kIsolateLibURL = "dart:isolate"; 27 const char* DartUtils::kIsolateLibURL = "dart:isolate";
29 28
30 29
31 const char* DartUtils::kIdFieldName = "_id"; 30 const char* DartUtils::kIdFieldName = "_id";
32 31
33 32
34 static bool IsWindowsHost() { 33 static bool IsWindowsHost() {
35 #if defined(TARGET_OS_WINDOWS) 34 #if defined(TARGET_OS_WINDOWS)
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 716
718 CObject* CObject::NewOSError(OSError* os_error) { 717 CObject* CObject::NewOSError(OSError* os_error) {
719 CObject* error_message = 718 CObject* error_message =
720 new CObjectString(CObject::NewString(os_error->message())); 719 new CObjectString(CObject::NewString(os_error->message()));
721 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); 720 CObjectArray* result = new CObjectArray(CObject::NewArray(3));
722 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); 721 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError)));
723 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); 722 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code())));
724 result->SetAt(2, error_message); 723 result->SetAt(2, error_message);
725 return result; 724 return result;
726 } 725 }
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/json_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698