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

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

Issue 2762323002: Reimplemented zone memory tracking to avoid race conditions that were causing crashes in the previo… (Closed)
Patch Set: Final change Created 3 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/service.cc » ('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 "platform/assert.h" 5 #include "platform/assert.h"
6 6
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/debugger.h" 9 #include "vm/debugger.h"
10 #include "vm/json_stream.h" 10 #include "vm/json_stream.h"
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 reg->PrintJSON(this); 555 reg->PrintJSON(this);
556 } 556 }
557 557
558 558
559 void JSONStream::PrintValue(Thread* thread) { 559 void JSONStream::PrintValue(Thread* thread) {
560 PrintCommaIfNeeded(); 560 PrintCommaIfNeeded();
561 thread->PrintJSON(this); 561 thread->PrintJSON(this);
562 } 562 }
563 563
564 564
565 void JSONStream::PrintValue(Zone* zone) {
566 PrintCommaIfNeeded();
567 zone->PrintJSON(this);
568 }
569
570
571 void JSONStream::PrintValue(const TimelineEvent* timeline_event) { 565 void JSONStream::PrintValue(const TimelineEvent* timeline_event) {
572 PrintCommaIfNeeded(); 566 PrintCommaIfNeeded();
573 timeline_event->PrintJSON(this); 567 timeline_event->PrintJSON(this);
574 } 568 }
575 569
576 570
577 void JSONStream::PrintValue(const TimelineEventBlock* timeline_event_block) { 571 void JSONStream::PrintValue(const TimelineEventBlock* timeline_event_block) {
578 PrintCommaIfNeeded(); 572 PrintCommaIfNeeded();
579 timeline_event_block->PrintJSON(this); 573 timeline_event_block->PrintJSON(this);
580 } 574 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 PrintValue(reg); 690 PrintValue(reg);
697 } 691 }
698 692
699 693
700 void JSONStream::PrintProperty(const char* name, Thread* thread) { 694 void JSONStream::PrintProperty(const char* name, Thread* thread) {
701 PrintPropertyName(name); 695 PrintPropertyName(name);
702 PrintValue(thread); 696 PrintValue(thread);
703 } 697 }
704 698
705 699
706 void JSONStream::PrintProperty(const char* name, Zone* zone) {
707 PrintPropertyName(name);
708 PrintValue(zone);
709 }
710
711
712 void JSONStream::PrintProperty(const char* name, 700 void JSONStream::PrintProperty(const char* name,
713 const TimelineEvent* timeline_event) { 701 const TimelineEvent* timeline_event) {
714 PrintPropertyName(name); 702 PrintPropertyName(name);
715 PrintValue(timeline_event); 703 PrintValue(timeline_event);
716 } 704 }
717 705
718 706
719 void JSONStream::PrintProperty(const char* name, 707 void JSONStream::PrintProperty(const char* name,
720 const TimelineEventBlock* timeline_event_block) { 708 const TimelineEventBlock* timeline_event_block) {
721 PrintPropertyName(name); 709 PrintPropertyName(name);
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 ASSERT(len == len2); 1019 ASSERT(len == len2);
1032 stream_->buffer_.AddChar('"'); 1020 stream_->buffer_.AddChar('"');
1033 stream_->AddEscapedUTF8String(p); 1021 stream_->AddEscapedUTF8String(p);
1034 stream_->buffer_.AddChar('"'); 1022 stream_->buffer_.AddChar('"');
1035 free(p); 1023 free(p);
1036 } 1024 }
1037 1025
1038 #endif // !PRODUCT 1026 #endif // !PRODUCT
1039 1027
1040 } // namespace dart 1028 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698