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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 9845040: - Make the URI resolution methods used by the tag handler private. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/bin/main.cc ('k') | no next file » | 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2197 return Api::NewError("%s: did not find static method '%s.%s'.", 2197 return Api::NewError("%s: did not find static method '%s.%s'.",
2198 CURRENT_FUNC, 2198 CURRENT_FUNC,
2199 cls_name.ToCString(), 2199 cls_name.ToCString(),
2200 function_name.ToCString()); 2200 function_name.ToCString());
2201 } 2201 }
2202 const Object& result = Object::Handle( 2202 const Object& result = Object::Handle(
2203 DartEntry::InvokeStatic(function, dart_args, kNoArgNames)); 2203 DartEntry::InvokeStatic(function, dart_args, kNoArgNames));
2204 return Api::NewLocalHandle(result); 2204 return Api::NewLocalHandle(result);
2205 2205
2206 } else if (obj.IsLibrary()) { 2206 } else if (obj.IsLibrary()) {
2207 // Finalize all classes. 2207 // Check whether class finalization is needed.
2208 const char* msg = CheckIsolateState(isolate); 2208 bool finalize_classes = true;
2209 if (msg != NULL) { 2209 Library& lib = Library::Handle();
2210 return Api::NewError(msg); 2210 lib ^= obj.raw();
2211
2212 // When calling functions in the dart:builtin library do not finalize as it
2213 // should have been prefinalized.
2214 Library& builtin =
2215 Library::Handle(isolate->object_store()->builtin_library());
2216 if (builtin.raw() == lib.raw()) {
2217 finalize_classes = false;
2211 } 2218 }
2212 2219
2213 Library& lib = Library::Handle(); 2220 // Finalize all classes if needed.
2214 lib ^= obj.raw(); 2221 if (finalize_classes) {
2222 const char* msg = CheckIsolateState(isolate);
2223 if (msg != NULL) {
2224 return Api::NewError(msg);
2225 }
2226 }
2227
2215 const Function& function = Function::Handle( 2228 const Function& function = Function::Handle(
2216 lib.LookupLocalFunction(function_name)); 2229 lib.LookupLocalFunction(function_name));
2217 if (function.IsNull()) { 2230 if (function.IsNull()) {
2218 return Api::NewError("%s: did not find top-level function '%s'.", 2231 return Api::NewError("%s: did not find top-level function '%s'.",
2219 CURRENT_FUNC, 2232 CURRENT_FUNC,
2220 function_name.ToCString()); 2233 function_name.ToCString());
2221 } 2234 }
2222 const Object& result = Object::Handle( 2235 const Object& result = Object::Handle(
2223 DartEntry::InvokeStatic(function, dart_args, kNoArgNames)); 2236 DartEntry::InvokeStatic(function, dart_args, kNoArgNames));
2224 return Api::NewLocalHandle(result); 2237 return Api::NewLocalHandle(result);
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
3245 *buffer = NULL; 3258 *buffer = NULL;
3246 } 3259 }
3247 delete debug_region; 3260 delete debug_region;
3248 } else { 3261 } else {
3249 *buffer = NULL; 3262 *buffer = NULL;
3250 *buffer_size = 0; 3263 *buffer_size = 0;
3251 } 3264 }
3252 } 3265 }
3253 3266
3254 } // namespace dart 3267 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698