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

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

Issue 1287043007: Fix overly-strict parameter checking of _getCallSiteData. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/observatory/lib/src/elements/script_inset.dart ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "vm/service.h" 5 #include "vm/service.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 10
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 "%s: invalid 'targetId' parameter: " 1962 "%s: invalid 'targetId' parameter: "
1963 "id '%s' does not correspond to a " 1963 "id '%s' does not correspond to a "
1964 "script, library, class, or function", 1964 "script, library, class, or function",
1965 js->method(), target_id); 1965 js->method(), target_id);
1966 return true; 1966 return true;
1967 } 1967 }
1968 1968
1969 1969
1970 static const MethodParameter* get_coverage_params[] = { 1970 static const MethodParameter* get_coverage_params[] = {
1971 ISOLATE_PARAMETER, 1971 ISOLATE_PARAMETER,
1972 new IdParameter("targetId", false),
1972 NULL, 1973 NULL,
1973 }; 1974 };
1974 1975
1975 1976
1976 static bool GetCoverage(Isolate* isolate, JSONStream* js) { 1977 static bool GetCoverage(Isolate* isolate, JSONStream* js) {
1977 // TODO(rmacnak): Remove this response; it is subsumed by GetCallSiteData. 1978 // TODO(rmacnak): Remove this response; it is subsumed by GetCallSiteData.
1978 return GetHitsOrSites(isolate, js, false); 1979 return GetHitsOrSites(isolate, js, false);
1979 } 1980 }
1980 1981
1981 1982
1982 static const MethodParameter* get_call_site_data_params[] = { 1983 static const MethodParameter* get_call_site_data_params[] = {
1983 ISOLATE_PARAMETER, 1984 ISOLATE_PARAMETER,
1984 new IdParameter("targetId", true), 1985 new IdParameter("targetId", false),
1985 NULL, 1986 NULL,
1986 }; 1987 };
1987 1988
1988 1989
1989 static bool GetCallSiteData(Isolate* isolate, JSONStream* js) { 1990 static bool GetCallSiteData(Isolate* isolate, JSONStream* js) {
1990 return GetHitsOrSites(isolate, js, true); 1991 return GetHitsOrSites(isolate, js, true);
1991 } 1992 }
1992 1993
1993 1994
1994 static const MethodParameter* add_breakpoint_params[] = { 1995 static const MethodParameter* add_breakpoint_params[] = {
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
3124 ServiceMethodDescriptor& method = service_methods_[i]; 3125 ServiceMethodDescriptor& method = service_methods_[i];
3125 if (strcmp(method_name, method.name) == 0) { 3126 if (strcmp(method_name, method.name) == 0) {
3126 return &method; 3127 return &method;
3127 } 3128 }
3128 } 3129 }
3129 return NULL; 3130 return NULL;
3130 } 3131 }
3131 3132
3132 3133
3133 } // namespace dart 3134 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/script_inset.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698