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

Unified Diff: runtime/vm/dart_api_impl.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
===================================================================
--- runtime/vm/dart_api_impl.cc (revision 20275)
+++ runtime/vm/dart_api_impl.cc (working copy)
@@ -4247,7 +4247,9 @@
DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url,
- Dart_Handle source) {
+ Dart_Handle source,
+ intptr_t line_offset,
+ intptr_t col_offset) {
TIMERSCOPE(time_script_loading);
Isolate* isolate = Isolate::Current();
DARTSCOPE(isolate);
@@ -4266,43 +4268,6 @@
return Api::NewError("%s: A script has already been loaded from '%s'.",
CURRENT_FUNC, library_url.ToCString());
}
- CHECK_CALLBACK_STATE(isolate);
-
- library = Library::New(url_str);
- library.set_debuggable(true);
- library.Register();
- isolate->object_store()->set_root_library(library);
-
- const Script& script = Script::Handle(
- isolate, Script::New(url_str, source_str, RawScript::kScriptTag));
- Dart_Handle result;
- CompileSource(isolate, library, script, &result);
- return result;
-}
-
-
-DART_EXPORT Dart_Handle Dart_LoadEmbeddedScript(Dart_Handle url,
- Dart_Handle source,
- intptr_t line_offset,
- intptr_t col_offset) {
- TIMERSCOPE(time_script_loading);
- Isolate* isolate = Isolate::Current();
- DARTSCOPE(isolate);
- const String& url_str = Api::UnwrapStringHandle(isolate, url);
- if (url_str.IsNull()) {
- RETURN_TYPE_ERROR(isolate, url, String);
- }
- const String& source_str = Api::UnwrapStringHandle(isolate, source);
- if (source_str.IsNull()) {
- RETURN_TYPE_ERROR(isolate, source, String);
- }
- Library& library =
- Library::Handle(isolate, isolate->object_store()->root_library());
- if (!library.IsNull()) {
- const String& library_url = String::Handle(isolate, library.url());
- return Api::NewError("%s: A script has already been loaded from '%s'.",
- CURRENT_FUNC, library_url.ToCString());
- }
if (line_offset < 0) {
return Api::NewError("%s: argument 'line_offset' must be positive number",
CURRENT_FUNC);
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698