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

Unified Diff: runtime/vm/json_stream.h

Issue 1799933002: Ensure embedder timeline callbacks are called for service protocol requests (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
Index: runtime/vm/json_stream.h
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 6c4f23e32bc1c0b5d804ff44714cec95935cf205..5b020b0d66013b83ba782c9394383e865183cfa3 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -55,6 +55,12 @@ enum JSONRpcErrorCode {
kIsolateMustBeRunnable = 105,
};
+// Expected that user_data is a JSONStream*.
+void AppendJSONStreamConsumer(Dart_StreamConsumer_State state,
+ const char* stream_name,
+ const uint8_t* buffer,
+ intptr_t buffer_length,
+ void* user_data);
class JSONStream : ValueObject {
public:
@@ -129,6 +135,12 @@ class JSONStream : ValueObject {
// Append |serialized_object| to the stream.
void AppendSerializedObject(const char* serialized_object);
+ void PrintCommaIfNeeded();
+
+ // Append |buffer| to the stream.
+ void AppendSerializedObject(const uint8_t* buffer,
+ intptr_t buffer_length);
+
// Append |serialized_object| to the stream with |property_name|.
void AppendSerializedObject(const char* property_name,
const char* serialized_object);
@@ -196,7 +208,6 @@ class JSONStream : ValueObject {
const TimelineEventBlock* timeline_event_block);
void PrintPropertyVM(const char* name, bool ref = true);
void PrintPropertyName(const char* name);
- void PrintCommaIfNeeded();
bool NeedComma();
bool AddDartString(const String& s, intptr_t offset, intptr_t count);

Powered by Google App Engine
This is Rietveld 408576698