Index: runtime/vm/disassembler_ia32.cc |
diff --git a/runtime/vm/disassembler_ia32.cc b/runtime/vm/disassembler_ia32.cc |
index b18dd3ff03e9bb90cda636d96864b4a5d3af4bc3..036f5d0aa9dae6708f7f137f79d07b2f774699de 100644 |
--- a/runtime/vm/disassembler_ia32.cc |
+++ b/runtime/vm/disassembler_ia32.cc |
@@ -479,11 +479,8 @@ static const char* ObjectToCStringNoGC(const Object& obj) { |
const Class& clazz = Class::Handle(obj.clazz()); |
const char* full_class_name = clazz.ToCString(); |
- const char* format = "instance of %s"; |
- intptr_t len = OS::SNPrint(NULL, 0, format, full_class_name) + 1; |
- char* chars = Thread::Current()->zone()->Alloc<char>(len); |
- OS::SNPrint(chars, len, format, full_class_name); |
- return chars; |
+ return OS::SCreate(Thread::Current()->zone(), |
+ "instance of %s", full_class_name); |
} |