diff options
author | isaacs <i@izs.me> | 2012-05-15 19:53:16 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-05-16 14:22:33 -0700 |
commit | 3f3f958c14cf4e963a73d6f037ac381c77fe78bb (patch) | |
tree | 391e35b59e76d038534fbd375f1bbe0dc55076cf /deps/v8/samples | |
parent | 4099d1eebae4e78864a6879c0b9e08f31d48d8cb (diff) | |
download | android-node-v8-3f3f958c14cf4e963a73d6f037ac381c77fe78bb.tar.gz android-node-v8-3f3f958c14cf4e963a73d6f037ac381c77fe78bb.tar.bz2 android-node-v8-3f3f958c14cf4e963a73d6f037ac381c77fe78bb.zip |
Upgrade V8 to 3.11.1
Diffstat (limited to 'deps/v8/samples')
-rw-r--r-- | deps/v8/samples/lineprocessor.cc | 6 | ||||
-rw-r--r-- | deps/v8/samples/samples.gyp | 8 | ||||
-rw-r--r-- | deps/v8/samples/shell.cc | 25 |
3 files changed, 24 insertions, 15 deletions
diff --git a/deps/v8/samples/lineprocessor.cc b/deps/v8/samples/lineprocessor.cc index 1606a8f99c..7a84a2a0ff 100644 --- a/deps/v8/samples/lineprocessor.cc +++ b/deps/v8/samples/lineprocessor.cc @@ -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 @@ v8::Handle<v8::String> ReadLine() { } if (res == NULL) { v8::Handle<v8::Primitive> t = v8::Undefined(); - return reinterpret_cast<v8::Handle<v8::String>&>(t); + return v8::Handle<v8::String>(v8::String::Cast(*t)); } - // remove newline char + // Remove newline char for (char* pos = buffer; *pos != '\0'; pos++) { if (*pos == '\n') { *pos = '\0'; diff --git a/deps/v8/samples/samples.gyp b/deps/v8/samples/samples.gyp index 55b2a98acd..3c720a748a 100644 --- a/deps/v8/samples/samples.gyp +++ b/deps/v8/samples/samples.gyp @@ -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', + ], } ], } diff --git a/deps/v8/samples/shell.cc b/deps/v8/samples/shell.cc index b40eca2f7c..db0cc1a930 100644 --- a/deps/v8/samples/shell.cc +++ b/deps/v8/samples/shell.cc @@ -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: @@ -67,17 +67,20 @@ static bool run_shell; int main(int argc, char* argv[]) { v8::V8::SetFlagsFromCommandLine(&argc, argv, true); run_shell = (argc == 1); - v8::HandleScope handle_scope; - v8::Persistent<v8::Context> context = CreateShellContext(); - if (context.IsEmpty()) { - printf("Error creating context\n"); - return 1; + int result; + { + v8::HandleScope handle_scope; + v8::Persistent<v8::Context> context = CreateShellContext(); + if (context.IsEmpty()) { + printf("Error creating context\n"); + return 1; + } + context->Enter(); + result = RunMain(argc, argv); + if (run_shell) RunShell(context); + context->Exit(); + context.Dispose(); } - context->Enter(); - int result = RunMain(argc, argv); - if (run_shell) RunShell(context); - context->Exit(); - context.Dispose(); v8::V8::Dispose(); return result; } |