Reviewers: Lasse Reichstein,

Message:
Lasse, may have a look?

Description:
Fix Win64 build with VS2008.

strlen returns size_t and VS2008 is now pretty picky about that.

Please review this at http://codereview.chromium.org/3384019/show

Affected files:
  M test/cctest/test-parsing.cc


Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 5ddd04416d7de384248743fee88a3abe033236ae..1fc7b3015c468968deaef148c26ab0092ac8dc7d 100755
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -155,8 +155,8 @@ TEST(ScanHTMLEndComments) {
       reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);

   for (int i = 0; tests[i]; i++) {
-    v8::ScriptData* data =
-        v8::ScriptData::PreCompile(tests[i], strlen(tests[i]));
+    v8::ScriptData* data = v8::ScriptData::PreCompile(
+        tests[i], static_cast<int>(strlen(tests[i])));
     CHECK(data != NULL && !data->HasError());
     delete data;
   }
@@ -198,9 +198,9 @@ TEST(Preparsing) {
       "var w = /RegExp Literal\\u0020With Escape/gin;"
       "var y = { get getter() { return 42; }, "
       "          set setter(v) { this.value = v; }};";
-  int source_length = strlen(source);
+  int source_length = static_cast<int>(strlen(source));
   const char* error_source = "var x = y z;";
-  int error_source_length = strlen(error_source);
+  int error_source_length = static_cast<int>(strlen(error_source));

   v8::ScriptData* preparse =
       v8::ScriptData::PreCompile(source, source_length);


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to