diff options
author | Trevor Norris <trev.norris@gmail.com> | 2013-07-22 15:26:27 -0700 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2013-07-22 15:53:10 -0700 |
commit | 5777d7ab3038983d368046ab40eb34075f635348 (patch) | |
tree | da7c01759b83e7afa463cbaac095a051f158eb44 /deps/v8/src/extensions | |
parent | 254b711155996e379a41a569a38dd98dbd7a6e47 (diff) | |
download | android-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/src/extensions')
-rw-r--r-- | deps/v8/src/extensions/i18n/break-iterator.cc | 2 | ||||
-rw-r--r-- | deps/v8/src/extensions/i18n/collator.cc | 3 | ||||
-rw-r--r-- | deps/v8/src/extensions/i18n/i18n-extension.cc | 1 | ||||
-rw-r--r-- | deps/v8/src/extensions/i18n/i18n-utils.cc | 7 | ||||
-rw-r--r-- | deps/v8/src/extensions/i18n/locale.cc | 3 | ||||
-rw-r--r-- | deps/v8/src/extensions/i18n/number-format.cc | 4 |
6 files changed, 18 insertions, 2 deletions
diff --git a/deps/v8/src/extensions/i18n/break-iterator.cc b/deps/v8/src/extensions/i18n/break-iterator.cc index 1225360fb7..0681e264ab 100644 --- a/deps/v8/src/extensions/i18n/break-iterator.cc +++ b/deps/v8/src/extensions/i18n/break-iterator.cc @@ -82,6 +82,7 @@ void BreakIterator::DeleteBreakIterator(v8::Isolate* isolate, object->Dispose(isolate); } + // Throws a JavaScript exception. static v8::Handle<v8::Value> ThrowUnexpectedObjectError() { // Returns undefined, and schedules an exception to be thrown. @@ -90,6 +91,7 @@ static v8::Handle<v8::Value> ThrowUnexpectedObjectError() { "that is not a BreakIterator."))); } + // Deletes the old value and sets the adopted text in corresponding // JavaScript object. icu::UnicodeString* ResetAdoptedText( diff --git a/deps/v8/src/extensions/i18n/collator.cc b/deps/v8/src/extensions/i18n/collator.cc index 4ffa4145fb..61b1d63e5c 100644 --- a/deps/v8/src/extensions/i18n/collator.cc +++ b/deps/v8/src/extensions/i18n/collator.cc @@ -76,6 +76,7 @@ void Collator::DeleteCollator(v8::Isolate* isolate, object->Dispose(isolate); } + // Throws a JavaScript exception. static v8::Handle<v8::Value> ThrowUnexpectedObjectError() { // Returns undefined, and schedules an exception to be thrown. @@ -84,11 +85,13 @@ static v8::Handle<v8::Value> ThrowUnexpectedObjectError() { "that is not a Collator."))); } + // When there's an ICU error, throw a JavaScript error with |message|. static v8::Handle<v8::Value> ThrowExceptionForICUError(const char* message) { return v8::ThrowException(v8::Exception::Error(v8::String::New(message))); } + // static void Collator::JSInternalCompare( const v8::FunctionCallbackInfo<v8::Value>& args) { diff --git a/deps/v8/src/extensions/i18n/i18n-extension.cc b/deps/v8/src/extensions/i18n/i18n-extension.cc index eb7652eae8..1c77b8899f 100644 --- a/deps/v8/src/extensions/i18n/i18n-extension.cc +++ b/deps/v8/src/extensions/i18n/i18n-extension.cc @@ -108,6 +108,7 @@ v8::Handle<v8::FunctionTemplate> Extension::GetNativeFunction( return v8::Handle<v8::FunctionTemplate>(); } + void Extension::Register() { static Extension i18n_extension; static v8::DeclareExtension extension_declaration(&i18n_extension); diff --git a/deps/v8/src/extensions/i18n/i18n-utils.cc b/deps/v8/src/extensions/i18n/i18n-utils.cc index d8d3c12aff..b720329f8b 100644 --- a/deps/v8/src/extensions/i18n/i18n-utils.cc +++ b/deps/v8/src/extensions/i18n/i18n-utils.cc @@ -42,6 +42,7 @@ void Utils::StrNCopy(char* dest, int length, const char* src) { dest[length - 1] = '\0'; } + // static bool Utils::V8StringToUnicodeString(const v8::Handle<v8::Value>& input, icu::UnicodeString* output) { @@ -54,6 +55,7 @@ bool Utils::V8StringToUnicodeString(const v8::Handle<v8::Value>& input, return true; } + // static bool Utils::ExtractStringSetting(const v8::Handle<v8::Object>& settings, const char* setting, @@ -74,6 +76,7 @@ bool Utils::ExtractStringSetting(const v8::Handle<v8::Object>& settings, return false; } + // static bool Utils::ExtractIntegerSetting(const v8::Handle<v8::Object>& settings, const char* setting, @@ -95,6 +98,7 @@ bool Utils::ExtractIntegerSetting(const v8::Handle<v8::Object>& settings, return false; } + // static bool Utils::ExtractBooleanSetting(const v8::Handle<v8::Object>& settings, const char* setting, @@ -116,6 +120,7 @@ bool Utils::ExtractBooleanSetting(const v8::Handle<v8::Object>& settings, return false; } + // static void Utils::AsciiToUChar(const char* source, int32_t source_length, @@ -135,6 +140,7 @@ void Utils::AsciiToUChar(const char* source, target[length - 1] = 0x0u; } + // static // Chrome Linux doesn't like static initializers in class, so we create // template on demand. @@ -153,6 +159,7 @@ v8::Local<v8::ObjectTemplate> Utils::GetTemplate(v8::Isolate* isolate) { return v8::Local<v8::ObjectTemplate>::New(isolate, icu_template); } + // static // Chrome Linux doesn't like static initializers in class, so we create // template on demand. This one has 2 internal fields. diff --git a/deps/v8/src/extensions/i18n/locale.cc b/deps/v8/src/extensions/i18n/locale.cc index b32cc30b16..6b6f9ac314 100644 --- a/deps/v8/src/extensions/i18n/locale.cc +++ b/deps/v8/src/extensions/i18n/locale.cc @@ -82,6 +82,7 @@ void JSCanonicalizeLanguageTag( args.GetReturnValue().Set(v8::String::New(result)); } + void JSAvailableLocalesOf(const v8::FunctionCallbackInfo<v8::Value>& args) { // Expect service name which is a string. if (args.Length() != 1 || !args[0]->IsString()) { @@ -131,6 +132,7 @@ void JSAvailableLocalesOf(const v8::FunctionCallbackInfo<v8::Value>& args) { args.GetReturnValue().Set(locales); } + void JSGetDefaultICULocale(const v8::FunctionCallbackInfo<v8::Value>& args) { icu::Locale default_locale; @@ -147,6 +149,7 @@ void JSGetDefaultICULocale(const v8::FunctionCallbackInfo<v8::Value>& args) { args.GetReturnValue().Set(v8::String::New("und")); } + void JSGetLanguageTagVariants(const v8::FunctionCallbackInfo<v8::Value>& args) { v8::TryCatch try_catch; diff --git a/deps/v8/src/extensions/i18n/number-format.cc b/deps/v8/src/extensions/i18n/number-format.cc index 2240b0846b..136471561c 100644 --- a/deps/v8/src/extensions/i18n/number-format.cc +++ b/deps/v8/src/extensions/i18n/number-format.cc @@ -148,10 +148,10 @@ void NumberFormat::JSInternalParse( args.GetReturnValue().Set(result.getDouble()); return; case icu::Formattable::kLong: - args.GetReturnValue().Set(v8::Number::New(result.getLong())); + args.GetReturnValue().Set(result.getLong()); return; case icu::Formattable::kInt64: - args.GetReturnValue().Set(v8::Number::New(result.getInt64())); + args.GetReturnValue().Set(static_cast<double>(result.getInt64())); return; default: return; |