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

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

Issue 2031103002: Fix canonicalization of --url_mapping URIs in gen_snapshot (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « runtime/bin/dartutils.h ('k') | 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/crypto.h" 7 #include "bin/crypto.h"
8 #include "bin/directory.h" 8 #include "bin/directory.h"
9 #include "bin/extensions.h" 9 #include "bin/extensions.h"
10 #include "bin/file.h" 10 #include "bin/file.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 327
328 Dart_Handle DartUtils::SetWorkingDirectory() { 328 Dart_Handle DartUtils::SetWorkingDirectory() {
329 IsolateData* isolate_data = 329 IsolateData* isolate_data =
330 reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData()); 330 reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData());
331 Dart_Handle builtin_lib = isolate_data->builtin_lib(); 331 Dart_Handle builtin_lib = isolate_data->builtin_lib();
332 Dart_Handle directory = NewString(original_working_directory); 332 Dart_Handle directory = NewString(original_working_directory);
333 return SingleArgDart_Invoke(builtin_lib, "_setWorkingDirectory", directory); 333 return SingleArgDart_Invoke(builtin_lib, "_setWorkingDirectory", directory);
334 } 334 }
335 335
336 336
337 Dart_Handle DartUtils::ResolveUri(Dart_Handle library_url, Dart_Handle url) {
338 const int kNumArgs = 2;
339 Dart_Handle dart_args[kNumArgs];
340 dart_args[0] = library_url;
341 dart_args[1] = url;
342 return Dart_Invoke(DartUtils::BuiltinLib(),
343 NewString("_resolveUri"),
344 kNumArgs,
345 dart_args);
346 }
347
348
337 Dart_Handle DartUtils::ResolveUriInWorkingDirectory(Dart_Handle script_uri) { 349 Dart_Handle DartUtils::ResolveUriInWorkingDirectory(Dart_Handle script_uri) {
338 const int kNumArgs = 1; 350 const int kNumArgs = 1;
339 Dart_Handle dart_args[kNumArgs]; 351 Dart_Handle dart_args[kNumArgs];
340 dart_args[0] = script_uri; 352 dart_args[0] = script_uri;
341 return Dart_Invoke(DartUtils::BuiltinLib(), 353 return Dart_Invoke(DartUtils::BuiltinLib(),
342 NewString("_resolveInWorkingDirectory"), 354 NewString("_resolveInWorkingDirectory"),
343 kNumArgs, 355 kNumArgs,
344 dart_args); 356 dart_args);
345 } 357 }
346 358
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 new CObjectString(CObject::NewString(os_error->message())); 1259 new CObjectString(CObject::NewString(os_error->message()));
1248 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); 1260 CObjectArray* result = new CObjectArray(CObject::NewArray(3));
1249 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); 1261 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError)));
1250 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); 1262 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code())));
1251 result->SetAt(2, error_message); 1263 result->SetAt(2, error_message);
1252 return result; 1264 return result;
1253 } 1265 }
1254 1266
1255 } // namespace bin 1267 } // namespace bin
1256 } // namespace dart 1268 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698