File tree 1 file changed +8
-6
lines changed 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 24
24
#include " bin/thread.h"
25
25
#include " bin/utils.h"
26
26
#include " bin/vmservice_impl.h"
27
- #include " platform/syslog.h"
28
27
29
28
#include " include/dart_api.h"
30
29
#include " include/dart_tools_api.h"
31
30
32
31
#include " platform/globals.h"
33
32
#include " platform/growable_array.h"
34
33
#include " platform/hashmap.h"
34
+ #include " platform/syslog.h"
35
+ #include " platform/text_buffer.h"
35
36
36
37
namespace dart {
37
38
namespace bin {
@@ -600,13 +601,14 @@ static File* OpenLoadingUnitManifest() {
600
601
static void WriteLoadingUnitManifest (File* manifest_file,
601
602
intptr_t id,
602
603
const char * path) {
603
- bool success = true ;
604
+ TextBuffer line ( 128 ) ;
604
605
if (id != 1 ) {
605
- success &= manifest_file-> Print (" ," );
606
+ line. Printf (" ," );
606
607
}
607
- success &=
608
- manifest_file->Print (" { \" id\" : %" Pd " , \" path\" : \" %s\" }\n " , id, path);
609
- if (!success) {
608
+ line.Printf (" { \" id\" : %" Pd " , \" path\" : \" " , id);
609
+ line.AddEscapedString (path);
610
+ line.Printf (" \" }" );
611
+ if (!manifest_file->Print (" %s\n " , line.buf ())) {
610
612
PrintErrAndExit (" Error: Unable to write file: %s\n\n " ,
611
613
loading_unit_manifest_filename);
612
614
}
You can’t perform that action at this time.
0 commit comments