Revision: 11326
Author:   [email protected]
Date:     Mon Apr 16 02:23:56 2012
Log:      Fix lineprocessor sample and include it in the gyp build.

Based on a patch by Peter Rybin <[email protected]> https://chromiumcodereview.appspot.com/10081030/

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9972006
http://code.google.com/p/v8/source/detail?r=11326

Modified:
 /branches/bleeding_edge/samples/lineprocessor.cc
 /branches/bleeding_edge/samples/samples.gyp

=======================================
--- /branches/bleeding_edge/samples/lineprocessor.cc Tue Dec 7 03:01:02 2010 +++ /branches/bleeding_edge/samples/lineprocessor.cc Mon Apr 16 02:23:56 2012
@@ -1,4 +1,4 @@
-// Copyright 2009 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are
 // met:
@@ -434,9 +434,9 @@
   }
   if (res == NULL) {
     v8::Handle<v8::Primitive> t = v8::Undefined();
-    return reinterpret_cast<v8::Handle<v8::String>&>(t);
-  }
-  // remove newline char
+    return v8::Handle<v8::String>(v8::String::Cast(*t));
+  }
+  // Remove newline char
   for (char* pos = buffer; *pos != '\0'; pos++) {
     if (*pos == '\n') {
       *pos = '\0';
=======================================
--- /branches/bleeding_edge/samples/samples.gyp Thu Aug 25 07:50:09 2011
+++ /branches/bleeding_edge/samples/samples.gyp Mon Apr 16 02:23:56 2012
@@ -1,4 +1,4 @@
-# Copyright 2011 the V8 project authors. All rights reserved.
+# Copyright 2012 the V8 project authors. All rights reserved.
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are
 # met:
@@ -48,6 +48,12 @@
       'sources': [
         'process.cc',
       ],
+    },
+    {
+      'target_name': 'lineprocessor',
+      'sources': [
+        'lineprocessor.cc',
+      ],
     }
   ],
 }

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

Reply via email to