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

Unified Diff: runtime/vm/service.cc

Issue 2512483002: Support reloading from source on top of a script snapshot. (Closed)
Patch Set: ... Created 4 years, 1 month 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/vm/object_reload.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 022199e6b195887fe544e5c002265521747cc2f2..5e34b4a9a4b17984245b32efc0db562261a07ba0 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -552,6 +552,15 @@ class IdParameter : public MethodParameter {
};
+class StringParameter : public MethodParameter {
+ public:
+ StringParameter(const char* name, bool required)
+ : MethodParameter(name, required) {}
+
+ virtual bool Validate(const char* value) const { return (value != NULL); }
+};
+
+
class RunnableIsolateParameter : public MethodParameter {
public:
explicit RunnableIsolateParameter(const char* name)
@@ -2442,8 +2451,12 @@ static bool GetSourceReport(Thread* thread, JSONStream* js) {
static const MethodParameter* reload_sources_params[] = {
- RUNNABLE_ISOLATE_PARAMETER, new BoolParameter("force", false),
- new BoolParameter("pause", false), NULL,
+ RUNNABLE_ISOLATE_PARAMETER,
+ new BoolParameter("force", false),
+ new BoolParameter("pause", false),
+ new StringParameter("rootLibUri", false),
+ new StringParameter("packagesUri", false),
+ NULL,
};
@@ -2479,7 +2492,8 @@ static bool ReloadSources(Thread* thread, JSONStream* js) {
const bool force_reload =
BoolParameter::Parse(js->LookupParam("force"), false);
- isolate->ReloadSources(js, force_reload);
+ isolate->ReloadSources(js, force_reload, js->LookupParam("rootLibUri"),
+ js->LookupParam("packagesUri"));
Service::CheckForPause(isolate, js);
« no previous file with comments | « runtime/vm/object_reload.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698