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

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

Issue 12919020: Remove redundant Dart_LoadScript as it doesn't seem to be used in the VM and hopefully dartium uses… (Closed) Base URL: http://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
« no previous file with comments | « no previous file | runtime/bin/gen_snapshot.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 "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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 Dart_Handle builtin_lib) { 342 Dart_Handle builtin_lib) {
343 Dart_Handle resolved_script_uri; 343 Dart_Handle resolved_script_uri;
344 resolved_script_uri = ResolveScriptUri(NewString(script_uri), builtin_lib); 344 resolved_script_uri = ResolveScriptUri(NewString(script_uri), builtin_lib);
345 if (Dart_IsError(resolved_script_uri)) { 345 if (Dart_IsError(resolved_script_uri)) {
346 return resolved_script_uri; 346 return resolved_script_uri;
347 } 347 }
348 Dart_Handle source = ReadSource(resolved_script_uri, builtin_lib); 348 Dart_Handle source = ReadSource(resolved_script_uri, builtin_lib);
349 if (Dart_IsError(source)) { 349 if (Dart_IsError(source)) {
350 return source; 350 return source;
351 } 351 }
352 return Dart_LoadEmbeddedScript(resolved_script_uri, source, 0, 0); 352 return Dart_LoadScript(resolved_script_uri, source, 0, 0);
353 } 353 }
354 354
355 355
356 Dart_Handle DartUtils::LoadSource(CommandLineOptions* url_mapping, 356 Dart_Handle DartUtils::LoadSource(CommandLineOptions* url_mapping,
357 Dart_Handle library, 357 Dart_Handle library,
358 Dart_Handle url, 358 Dart_Handle url,
359 Dart_LibraryTag tag, 359 Dart_LibraryTag tag,
360 const char* url_string) { 360 const char* url_string) {
361 if (url_mapping != NULL && IsDartSchemeURL(url_string)) { 361 if (url_mapping != NULL && IsDartSchemeURL(url_string)) {
362 const char* mapped_url_string = MapLibraryUrl(url_mapping, url_string); 362 const char* mapped_url_string = MapLibraryUrl(url_mapping, url_string);
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 694
695 CObject* CObject::NewOSError(OSError* os_error) { 695 CObject* CObject::NewOSError(OSError* os_error) {
696 CObject* error_message = 696 CObject* error_message =
697 new CObjectString(CObject::NewString(os_error->message())); 697 new CObjectString(CObject::NewString(os_error->message()));
698 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); 698 CObjectArray* result = new CObjectArray(CObject::NewArray(3));
699 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); 699 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError)));
700 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); 700 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code())));
701 result->SetAt(2, error_message); 701 result->SetAt(2, error_message);
702 return result; 702 return result;
703 } 703 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698