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

Side by Side Diff: runtime/bin/vmservice_impl.cc

Issue 27694005: Fix issue 13942 - Dart_Error function invokes OS::VSNPrint with the "format" string containing data… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/gen_snapshot.cc ('k') | runtime/include/dart_api.h » ('j') | 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 "bin/vmservice_impl.h" 5 #include "bin/vmservice_impl.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 static bool IsVMServiceLibrary(const char* url) { 284 static bool IsVMServiceLibrary(const char* url) {
285 return 0 == strcmp(kVMServiceLibraryName, url); 285 return 0 == strcmp(kVMServiceLibraryName, url);
286 } 286 }
287 287
288 288
289 Dart_Handle VmService::LibraryTagHandler(Dart_LibraryTag tag, 289 Dart_Handle VmService::LibraryTagHandler(Dart_LibraryTag tag,
290 Dart_Handle library, 290 Dart_Handle library,
291 Dart_Handle url) { 291 Dart_Handle url) {
292 if (!Dart_IsLibrary(library)) { 292 if (!Dart_IsLibrary(library)) {
293 return Dart_Error("not a library"); 293 return Dart_NewApiError("not a library");
294 } 294 }
295 if (!Dart_IsString(url)) { 295 if (!Dart_IsString(url)) {
296 return Dart_Error("url is not a string"); 296 return Dart_NewApiError("url is not a string");
297 } 297 }
298 const char* url_string = NULL; 298 const char* url_string = NULL;
299 Dart_Handle result = Dart_StringToCString(url, &url_string); 299 Dart_Handle result = Dart_StringToCString(url, &url_string);
300 if (Dart_IsError(result)) { 300 if (Dart_IsError(result)) {
301 return result; 301 return result;
302 } 302 }
303 Dart_Handle library_url = Dart_LibraryUrl(library); 303 Dart_Handle library_url = Dart_LibraryUrl(library);
304 const char* library_url_string = NULL; 304 const char* library_url_string = NULL;
305 result = Dart_StringToCString(library_url, &library_url_string); 305 result = Dart_StringToCString(library_url, &library_url_string);
306 if (Dart_IsError(result)) { 306 if (Dart_IsError(result)) {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 if (!strcmp(function_name, entry.name) && 519 if (!strcmp(function_name, entry.name) &&
520 (num_arguments == entry.num_arguments)) { 520 (num_arguments == entry.num_arguments)) {
521 return entry.function; 521 return entry.function;
522 } 522 }
523 } 523 }
524 return NULL; 524 return NULL;
525 } 525 }
526 526
527 } // namespace bin 527 } // namespace bin
528 } // namespace dart 528 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | runtime/include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698