Chromium Code Reviews| Index: runtime/vm/dart_api_impl.cc |
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
| index f8c18ed05f9bb276ced8351b1aab8341465704a2..f1acf1c55617c9db862c4d8ac567aa2d93ac84bf 100644 |
| --- a/runtime/vm/dart_api_impl.cc |
| +++ b/runtime/vm/dart_api_impl.cc |
| @@ -4422,6 +4422,34 @@ DART_EXPORT Dart_Handle Dart_LoadSource(Dart_Handle library, |
| } |
| +DART_EXPORT Dart_Handle Dart_LoadPatch(Dart_Handle library, |
|
Mads Ager (google)
2012/10/25 10:47:46
This code is completely duplicated from LoadSource
|
| + Dart_Handle url, |
| + Dart_Handle patch_source) { |
| + TIMERSCOPE(time_script_loading); |
| + Isolate* isolate = Isolate::Current(); |
| + DARTSCOPE(isolate); |
| + if (FLAG_use_cha) { |
|
Ivan Posva
2012/10/26 04:33:34
Leave it like this but note: dartbug.com/6288
|
| + RemoveOptimizedCode(); |
| + } |
| + const Library& lib = Api::UnwrapLibraryHandle(isolate, library); |
| + if (lib.IsNull()) { |
| + RETURN_TYPE_ERROR(isolate, library, Library); |
| + } |
| + 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, patch_source); |
| + if (source_str.IsNull()) { |
| + RETURN_TYPE_ERROR(isolate, patch_source, String); |
| + } |
| + Dart_Handle result; |
| + CompileSource(isolate, lib, url_str, source_str, |
| + RawScript::kPatchTag, &result); |
| + return result; |
| +} |
| + |
| + |
| DART_EXPORT Dart_Handle Dart_SetNativeResolver( |
| Dart_Handle library, |
| Dart_NativeEntryResolver resolver) { |