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

Side by Side Diff: runtime/lib/developer.cc

Issue 1299493007: Rework service extensions to be safe (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | runtime/lib/developer.dart » ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/debugger.h" 9 #include "vm/debugger.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 timestamp.AsInt64Value(), 52 timestamp.AsInt64Value(),
53 level.Value(), 53 level.Value(),
54 name, 54 name,
55 message, 55 message,
56 dart_zone, 56 dart_zone,
57 error, 57 error,
58 stack_trace); 58 stack_trace);
59 return Object::null(); 59 return Object::null();
60 } 60 }
61 61
62
63 DEFINE_NATIVE_ENTRY(Developer_lookupExtension, 1) {
64 GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0));
65 return isolate->LookupServiceExtensionHandler(name);
66 }
67
68
69 DEFINE_NATIVE_ENTRY(Developer_registerExtension, 2) {
70 GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0));
71 GET_NON_NULL_NATIVE_ARGUMENT(Instance, handler, arguments->NativeArgAt(1));
72 isolate->RegisterServiceExtensionHandler(name, handler);
73 return Object::null();
74 }
75
62 } // namespace dart 76 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/developer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698