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

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

Issue 10332109: Make the crypto library an official dart:crypto library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix long line Created 8 years, 7 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/gen_snapshot.cc ('k') | tests/lib/crypto/hmac_md5_test.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 <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_debugger_api.h" 10 #include "include/dart_debugger_api.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 328 }
329 Dart_Handle dart_args[2]; 329 Dart_Handle dart_args[2];
330 dart_args[0] = library_url; 330 dart_args[0] = library_url;
331 dart_args[1] = url; 331 dart_args[1] = url;
332 return Dart_Invoke( 332 return Dart_Invoke(
333 builtin_lib, Dart_NewString("_resolveUri"), 2, dart_args); 333 builtin_lib, Dart_NewString("_resolveUri"), 2, dart_args);
334 } 334 }
335 if (is_dart_scheme_url) { 335 if (is_dart_scheme_url) {
336 ASSERT(tag == kImportTag); 336 ASSERT(tag == kImportTag);
337 // Handle imports of other built-in libraries present in the SDK. 337 // Handle imports of other built-in libraries present in the SDK.
338 if (DartUtils::IsDartIOLibURL(url_string)) { 338 if (DartUtils::IsDartCryptoLibURL(url_string)) {
339 return Builtin::LoadLibrary(Builtin::kCryptoLibrary);
340 } else if (DartUtils::IsDartIOLibURL(url_string)) {
339 return Builtin::LoadLibrary(Builtin::kIOLibrary); 341 return Builtin::LoadLibrary(Builtin::kIOLibrary);
340 } else if (DartUtils::IsDartJsonLibURL(url_string)) { 342 } else if (DartUtils::IsDartJsonLibURL(url_string)) {
341 return Builtin::LoadLibrary(Builtin::kJsonLibrary); 343 return Builtin::LoadLibrary(Builtin::kJsonLibrary);
342 } else if (DartUtils::IsDartUriLibURL(url_string)) { 344 } else if (DartUtils::IsDartUriLibURL(url_string)) {
343 return Builtin::LoadLibrary(Builtin::kUriLibrary); 345 return Builtin::LoadLibrary(Builtin::kUriLibrary);
344 } else if (DartUtils::IsDartUtfLibURL(url_string)) { 346 } else if (DartUtils::IsDartUtfLibURL(url_string)) {
345 return Builtin::LoadLibrary(Builtin::kUtfLibrary); 347 return Builtin::LoadLibrary(Builtin::kUtfLibrary);
346 } else { 348 } else {
347 return Dart_Error("Do not know how to load '%s'", url_string); 349 return Dart_Error("Do not know how to load '%s'", url_string);
348 } 350 }
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 Dart_ShutdownIsolate(); 697 Dart_ShutdownIsolate();
696 // Terminate process exit-code handler. 698 // Terminate process exit-code handler.
697 Process::TerminateExitCodeHandler(); 699 Process::TerminateExitCodeHandler();
698 700
699 free(const_cast<char*>(original_script_name)); 701 free(const_cast<char*>(original_script_name));
700 free(const_cast<char*>(original_working_directory)); 702 free(const_cast<char*>(original_working_directory));
701 free(const_cast<char*>(original_script_url)); 703 free(const_cast<char*>(original_script_url));
702 704
703 return 0; 705 return 0;
704 } 706 }
OLDNEW
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | tests/lib/crypto/hmac_md5_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698