瀏覽代碼

Fix MSVC stack overflow issue.

Feng Xiao 9 年之前
父節點
當前提交
4d3e4cfa4a
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/google/protobuf/util/internal/json_stream_parser_test.cc

+ 5 - 0
src/google/protobuf/util/internal/json_stream_parser_test.cc

@@ -139,7 +139,12 @@ class JsonStreamParserTest : public ::testing::Test {
   }
   }
 
 
 
 
+#ifndef _MSC_VER
+  // TODO(xiaofeng): We have to disable InSequence check for MSVC because it
+  // causes stack overflow due to its use of a linked list that is desctructed
+  // recursively. 
   ::testing::InSequence in_sequence_;
   ::testing::InSequence in_sequence_;
+#endif  // !_MSC_VER
   MockObjectWriter mock_;
   MockObjectWriter mock_;
   ExpectingObjectWriter ow_;
   ExpectingObjectWriter ow_;
 };
 };