summaryrefslogtreecommitdiff
path: root/deps/v8/samples
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2013-07-22 15:26:27 -0700
committerTrevor Norris <trev.norris@gmail.com>2013-07-22 15:53:10 -0700
commit5777d7ab3038983d368046ab40eb34075f635348 (patch)
treeda7c01759b83e7afa463cbaac095a051f158eb44 /deps/v8/samples
parent254b711155996e379a41a569a38dd98dbd7a6e47 (diff)
downloadandroid-node-v8-5777d7ab3038983d368046ab40eb34075f635348.tar.gz
android-node-v8-5777d7ab3038983d368046ab40eb34075f635348.tar.bz2
android-node-v8-5777d7ab3038983d368046ab40eb34075f635348.zip
v8: upgrade to v8 3.20.7
Diffstat (limited to 'deps/v8/samples')
-rw-r--r--deps/v8/samples/lineprocessor.cc3
-rw-r--r--deps/v8/samples/process.cc4
-rw-r--r--deps/v8/samples/samples.gyp16
-rw-r--r--deps/v8/samples/shell.cc1
4 files changed, 23 insertions, 1 deletions
diff --git a/deps/v8/samples/lineprocessor.cc b/deps/v8/samples/lineprocessor.cc
index 214af057db..42048202fd 100644
--- a/deps/v8/samples/lineprocessor.cc
+++ b/deps/v8/samples/lineprocessor.cc
@@ -322,7 +322,9 @@ bool RunCppCycle(v8::Handle<v8::Script> script,
return true;
}
+
int main(int argc, char* argv[]) {
+ v8::V8::InitializeICU();
int result = RunMain(argc, argv);
v8::V8::Dispose();
return result;
@@ -421,6 +423,7 @@ void ReadLine(const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().Set(ReadLine());
}
+
v8::Handle<v8::String> ReadLine() {
const int kBufferSize = 1024 + 1;
char buffer[kBufferSize];
diff --git a/deps/v8/samples/process.cc b/deps/v8/samples/process.cc
index 97eec14dc3..844aee3d45 100644
--- a/deps/v8/samples/process.cc
+++ b/deps/v8/samples/process.cc
@@ -54,6 +54,7 @@ class HttpRequest {
virtual const string& UserAgent() = 0;
};
+
/**
* The abstract superclass of http request processors.
*/
@@ -72,6 +73,7 @@ class HttpRequestProcessor {
static void Log(const char* event);
};
+
/**
* An http request processor that is scriptable using JavaScript.
*/
@@ -135,6 +137,7 @@ class JsHttpRequestProcessor : public HttpRequestProcessor {
static Persistent<ObjectTemplate> map_template_;
};
+
// -------------------------
// --- P r o c e s s o r ---
// -------------------------
@@ -624,6 +627,7 @@ void PrintMap(map<string, string>* m) {
int main(int argc, char* argv[]) {
+ v8::V8::InitializeICU();
map<string, string> options;
string file;
ParseOptions(argc, argv, options, &file);
diff --git a/deps/v8/samples/samples.gyp b/deps/v8/samples/samples.gyp
index 8b1de7eb42..be7b9ea696 100644
--- a/deps/v8/samples/samples.gyp
+++ b/deps/v8/samples/samples.gyp
@@ -28,8 +28,9 @@
{
'variables': {
'v8_code': 1,
+ 'v8_enable_i18n_support%': 0,
},
- 'includes': ['../build/common.gypi'],
+ 'includes': ['../build/toolchain.gypi', '../build/features.gypi'],
'target_defaults': {
'type': 'executable',
'dependencies': [
@@ -38,6 +39,19 @@
'include_dirs': [
'../include',
],
+ 'conditions': [
+ ['v8_enable_i18n_support==1', {
+ 'dependencies': [
+ '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
+ '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
+ ],
+ }],
+ ['OS=="win" and v8_enable_i18n_support==1', {
+ 'dependencies': [
+ '<(DEPTH)/third_party/icu/icu.gyp:icudata',
+ ],
+ }],
+ ],
},
'targets': [
{
diff --git a/deps/v8/samples/shell.cc b/deps/v8/samples/shell.cc
index a0af931b23..710547c341 100644
--- a/deps/v8/samples/shell.cc
+++ b/deps/v8/samples/shell.cc
@@ -66,6 +66,7 @@ static bool run_shell;
int main(int argc, char* argv[]) {
+ v8::V8::InitializeICU();
v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
v8::Isolate* isolate = v8::Isolate::GetCurrent();
run_shell = (argc == 1);