Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: src/i18n.cc

Issue 83323003: Remove usage of deprecated APIs from v8 itself (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/extensions/statistics-extension.cc ('k') | src/mksnapshot.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 865
866 866
867 void DateFormat::DeleteDateFormat(v8::Isolate* isolate, 867 void DateFormat::DeleteDateFormat(v8::Isolate* isolate,
868 Persistent<v8::Value>* object, 868 Persistent<v8::Value>* object,
869 void* param) { 869 void* param) {
870 // First delete the hidden C++ object. 870 // First delete the hidden C++ object.
871 delete reinterpret_cast<icu::SimpleDateFormat*>(Handle<JSObject>::cast( 871 delete reinterpret_cast<icu::SimpleDateFormat*>(Handle<JSObject>::cast(
872 v8::Utils::OpenPersistent(object))->GetInternalField(0)); 872 v8::Utils::OpenPersistent(object))->GetInternalField(0));
873 873
874 // Then dispose of the persistent handle to JS object. 874 // Then dispose of the persistent handle to JS object.
875 object->Dispose(); 875 object->Reset();
876 } 876 }
877 877
878 878
879 icu::DecimalFormat* NumberFormat::InitializeNumberFormat( 879 icu::DecimalFormat* NumberFormat::InitializeNumberFormat(
880 Isolate* isolate, 880 Isolate* isolate,
881 Handle<String> locale, 881 Handle<String> locale,
882 Handle<JSObject> options, 882 Handle<JSObject> options,
883 Handle<JSObject> resolved) { 883 Handle<JSObject> resolved) {
884 // Convert BCP47 into ICU locale format. 884 // Convert BCP47 into ICU locale format.
885 UErrorCode status = U_ZERO_ERROR; 885 UErrorCode status = U_ZERO_ERROR;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 929
930 930
931 void NumberFormat::DeleteNumberFormat(v8::Isolate* isolate, 931 void NumberFormat::DeleteNumberFormat(v8::Isolate* isolate,
932 Persistent<v8::Value>* object, 932 Persistent<v8::Value>* object,
933 void* param) { 933 void* param) {
934 // First delete the hidden C++ object. 934 // First delete the hidden C++ object.
935 delete reinterpret_cast<icu::DecimalFormat*>(Handle<JSObject>::cast( 935 delete reinterpret_cast<icu::DecimalFormat*>(Handle<JSObject>::cast(
936 v8::Utils::OpenPersistent(object))->GetInternalField(0)); 936 v8::Utils::OpenPersistent(object))->GetInternalField(0));
937 937
938 // Then dispose of the persistent handle to JS object. 938 // Then dispose of the persistent handle to JS object.
939 object->Dispose(); 939 object->Reset();
940 } 940 }
941 941
942 942
943 icu::Collator* Collator::InitializeCollator( 943 icu::Collator* Collator::InitializeCollator(
944 Isolate* isolate, 944 Isolate* isolate,
945 Handle<String> locale, 945 Handle<String> locale,
946 Handle<JSObject> options, 946 Handle<JSObject> options,
947 Handle<JSObject> resolved) { 947 Handle<JSObject> resolved) {
948 // Convert BCP47 into ICU locale format. 948 // Convert BCP47 into ICU locale format.
949 UErrorCode status = U_ZERO_ERROR; 949 UErrorCode status = U_ZERO_ERROR;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 990
991 991
992 void Collator::DeleteCollator(v8::Isolate* isolate, 992 void Collator::DeleteCollator(v8::Isolate* isolate,
993 Persistent<v8::Value>* object, 993 Persistent<v8::Value>* object,
994 void* param) { 994 void* param) {
995 // First delete the hidden C++ object. 995 // First delete the hidden C++ object.
996 delete reinterpret_cast<icu::Collator*>(Handle<JSObject>::cast( 996 delete reinterpret_cast<icu::Collator*>(Handle<JSObject>::cast(
997 v8::Utils::OpenPersistent(object))->GetInternalField(0)); 997 v8::Utils::OpenPersistent(object))->GetInternalField(0));
998 998
999 // Then dispose of the persistent handle to JS object. 999 // Then dispose of the persistent handle to JS object.
1000 object->Dispose(); 1000 object->Reset();
1001 } 1001 }
1002 1002
1003 1003
1004 icu::BreakIterator* BreakIterator::InitializeBreakIterator( 1004 icu::BreakIterator* BreakIterator::InitializeBreakIterator(
1005 Isolate* isolate, 1005 Isolate* isolate,
1006 Handle<String> locale, 1006 Handle<String> locale,
1007 Handle<JSObject> options, 1007 Handle<JSObject> options,
1008 Handle<JSObject> resolved) { 1008 Handle<JSObject> resolved) {
1009 // Convert BCP47 into ICU locale format. 1009 // Convert BCP47 into ICU locale format.
1010 UErrorCode status = U_ZERO_ERROR; 1010 UErrorCode status = U_ZERO_ERROR;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 Persistent<v8::Value>* object, 1057 Persistent<v8::Value>* object,
1058 void* param) { 1058 void* param) {
1059 // First delete the hidden C++ object. 1059 // First delete the hidden C++ object.
1060 delete reinterpret_cast<icu::BreakIterator*>(Handle<JSObject>::cast( 1060 delete reinterpret_cast<icu::BreakIterator*>(Handle<JSObject>::cast(
1061 v8::Utils::OpenPersistent(object))->GetInternalField(0)); 1061 v8::Utils::OpenPersistent(object))->GetInternalField(0));
1062 1062
1063 delete reinterpret_cast<icu::UnicodeString*>(Handle<JSObject>::cast( 1063 delete reinterpret_cast<icu::UnicodeString*>(Handle<JSObject>::cast(
1064 v8::Utils::OpenPersistent(object))->GetInternalField(1)); 1064 v8::Utils::OpenPersistent(object))->GetInternalField(1));
1065 1065
1066 // Then dispose of the persistent handle to JS object. 1066 // Then dispose of the persistent handle to JS object.
1067 object->Dispose(); 1067 object->Reset();
1068 } 1068 }
1069 1069
1070 } } // namespace v8::internal 1070 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/extensions/statistics-extension.cc ('k') | src/mksnapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698