summaryrefslogtreecommitdiff
path: root/deps/v8/samples/shell.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-11-30 11:34:27 -0800
committerRyan Dahl <ry@tinyclouds.org>2010-11-30 11:37:43 -0800
commit7286b7952150672cded846e5eee5c533e72f3e9e (patch)
treeca2402b34014b3ca916836eaf33156585501c466 /deps/v8/samples/shell.cc
parent486c74e72bd015ac178f881806a1d36accdcecce (diff)
downloadandroid-node-v8-7286b7952150672cded846e5eee5c533e72f3e9e.tar.gz
android-node-v8-7286b7952150672cded846e5eee5c533e72f3e9e.tar.bz2
android-node-v8-7286b7952150672cded846e5eee5c533e72f3e9e.zip
Upgrade V8 to 2.5.9.1
Diffstat (limited to 'deps/v8/samples/shell.cc')
-rw-r--r--deps/v8/samples/shell.cc14
1 files changed, 1 insertions, 13 deletions
diff --git a/deps/v8/samples/shell.cc b/deps/v8/samples/shell.cc
index 2bdc5a19da..1a13f5f80b 100644
--- a/deps/v8/samples/shell.cc
+++ b/deps/v8/samples/shell.cc
@@ -37,7 +37,6 @@ bool ExecuteString(v8::Handle<v8::String> source,
v8::Handle<v8::Value> name,
bool print_result,
bool report_exceptions);
-v8::Handle<v8::Value> PrintToInteger(const v8::Arguments& args);
v8::Handle<v8::Value> Print(const v8::Arguments& args);
v8::Handle<v8::Value> Read(const v8::Arguments& args);
v8::Handle<v8::Value> Load(const v8::Arguments& args);
@@ -54,8 +53,7 @@ int RunMain(int argc, char* argv[]) {
v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New();
// Bind the global 'print' function to the C++ Print callback.
global->Set(v8::String::New("print"), v8::FunctionTemplate::New(Print));
-global->Set(v8::String::New("print2int"), v8::FunctionTemplate::New(PrintToInteger));
-// Bind the global 'read' function to the C++ Read callback.
+ // Bind the global 'read' function to the C++ Read callback.
global->Set(v8::String::New("read"), v8::FunctionTemplate::New(Read));
// Bind the global 'load' function to the C++ Load callback.
global->Set(v8::String::New("load"), v8::FunctionTemplate::New(Load));
@@ -140,16 +138,6 @@ v8::Handle<v8::Value> Print(const v8::Arguments& args) {
}
-v8::Handle<v8::Value> PrintToInteger(const v8::Arguments& args) {
- v8::HandleScope handle_scope;
- v8::String::Utf8Value str(args[0]);
- const char* cstr = ToCString(str);
- printf("%s -> %d\n", cstr, args[0]->ToInt32()->Value());
- fflush(stdout);
- return v8::Undefined();
-}
-
-
// The callback that is invoked by v8 whenever the JavaScript 'read'
// function is called. This function loads the content of the file named in
// the argument into a JavaScript string.