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

Unified Diff: runtime/vm/isolate.h

Issue 1299493007: Rework service extensions to be safe (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index cc07c1bb2f3de4620214165f8533b09ab1d9b1f4..d216b477836fff9e701ef85c9832da43c69bc578 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -707,6 +707,17 @@ class Isolate : public BaseIsolate {
compilation_allowed_ = allowed;
}
+ RawObject* InvokePendingServiceExtensionCalls();
+ void AppendServiceExtensionCall(const Instance& closure,
+ const String& method_name,
+ const Array& parameter_keys,
+ const Array& parameter_values,
+ const Instance& reply_port,
+ const Instance& id);
+ void RegisterServiceExtensionHandler(const String& name,
+ const Instance& closure);
+ RawInstance* LookupServiceExtensionHandler(const String& name);
+
#if defined(DEBUG)
#define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \
void set_reusable_##object##_handle_scope_active(bool value) { \
@@ -770,6 +781,17 @@ class Isolate : public BaseIsolate {
user_tag_ = tag;
}
+ RawGrowableObjectArray* GetAndClearPendingServiceExtensionCalls();
+ RawGrowableObjectArray* pending_service_extension_calls() const {
+ return pending_service_extension_calls_;
+ }
+ void set_pending_service_extension_calls(const GrowableObjectArray& value);
+ RawGrowableObjectArray* registered_service_extension_handlers() const {
+ return registered_service_extension_handlers_;
+ }
+ void set_registered_service_extension_handlers(
+ const GrowableObjectArray& value);
+
void ClearMutatorThread() {
mutator_thread_ = NULL;
}
@@ -862,6 +884,26 @@ class Isolate : public BaseIsolate {
RawGrowableObjectArray* collected_closures_;
RawGrowableObjectArray* deoptimized_code_array_;
+ // We use 6 list entries for each pending service extension calls.
+ enum {
+ kPendingHandlerIndex = 0,
+ kPendingMethodNameIndex,
+ kPendingKeysIndex,
+ kPendingValuesIndex,
+ kPendingReplyPortIndex,
+ kPendingIdIndex,
+ kPendingEntrySize
+ };
+ RawGrowableObjectArray* pending_service_extension_calls_;
+
+ // We use 2 list entries for each registered extension handler.
+ enum {
+ kRegisteredNameIndex = 0,
+ kRegisteredHandlerIndex,
+ kRegisteredEntrySize
+ };
+ RawGrowableObjectArray* registered_service_extension_handlers_;
+
Metric* metrics_list_head_;
Counters counters_;
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698