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

Side by Side Diff: src/i18n.cc

Issue 2741683004: [rename] Rename internal field to embedder field. (Closed)
Patch Set: [rename] Rename internal field to embedder field. Created 3 years, 9 months 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // limitations under the License. 4 // limitations under the License.
5 5
6 #include "src/i18n.h" 6 #include "src/i18n.h"
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/api.h" 10 #include "src/api.h"
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 SetResolvedDateSettings(isolate, icu_locale, date_format, resolved); 734 SetResolvedDateSettings(isolate, icu_locale, date_format, resolved);
735 } 735 }
736 736
737 return date_format; 737 return date_format;
738 } 738 }
739 739
740 740
741 icu::SimpleDateFormat* DateFormat::UnpackDateFormat( 741 icu::SimpleDateFormat* DateFormat::UnpackDateFormat(
742 Isolate* isolate, 742 Isolate* isolate,
743 Handle<JSObject> obj) { 743 Handle<JSObject> obj) {
744 return reinterpret_cast<icu::SimpleDateFormat*>(obj->GetInternalField(0)); 744 return reinterpret_cast<icu::SimpleDateFormat*>(obj->GetEmbedderField(0));
745 } 745 }
746 746
747 void DateFormat::DeleteDateFormat(const v8::WeakCallbackInfo<void>& data) { 747 void DateFormat::DeleteDateFormat(const v8::WeakCallbackInfo<void>& data) {
748 delete reinterpret_cast<icu::SimpleDateFormat*>(data.GetInternalField(0)); 748 delete reinterpret_cast<icu::SimpleDateFormat*>(data.GetInternalField(0));
749 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter())); 749 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter()));
750 } 750 }
751 751
752 752
753 icu::DecimalFormat* NumberFormat::InitializeNumberFormat( 753 icu::DecimalFormat* NumberFormat::InitializeNumberFormat(
754 Isolate* isolate, 754 Isolate* isolate,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 SetResolvedNumberSettings(isolate, icu_locale, number_format, resolved); 789 SetResolvedNumberSettings(isolate, icu_locale, number_format, resolved);
790 } 790 }
791 791
792 return number_format; 792 return number_format;
793 } 793 }
794 794
795 795
796 icu::DecimalFormat* NumberFormat::UnpackNumberFormat( 796 icu::DecimalFormat* NumberFormat::UnpackNumberFormat(
797 Isolate* isolate, 797 Isolate* isolate,
798 Handle<JSObject> obj) { 798 Handle<JSObject> obj) {
799 return reinterpret_cast<icu::DecimalFormat*>(obj->GetInternalField(0)); 799 return reinterpret_cast<icu::DecimalFormat*>(obj->GetEmbedderField(0));
800 } 800 }
801 801
802 void NumberFormat::DeleteNumberFormat(const v8::WeakCallbackInfo<void>& data) { 802 void NumberFormat::DeleteNumberFormat(const v8::WeakCallbackInfo<void>& data) {
803 delete reinterpret_cast<icu::DecimalFormat*>(data.GetInternalField(0)); 803 delete reinterpret_cast<icu::DecimalFormat*>(data.GetInternalField(0));
804 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter())); 804 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter()));
805 } 805 }
806 806
807 807
808 icu::Collator* Collator::InitializeCollator( 808 icu::Collator* Collator::InitializeCollator(
809 Isolate* isolate, 809 Isolate* isolate,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 } else { 841 } else {
842 SetResolvedCollatorSettings(isolate, icu_locale, collator, resolved); 842 SetResolvedCollatorSettings(isolate, icu_locale, collator, resolved);
843 } 843 }
844 844
845 return collator; 845 return collator;
846 } 846 }
847 847
848 848
849 icu::Collator* Collator::UnpackCollator(Isolate* isolate, 849 icu::Collator* Collator::UnpackCollator(Isolate* isolate,
850 Handle<JSObject> obj) { 850 Handle<JSObject> obj) {
851 return reinterpret_cast<icu::Collator*>(obj->GetInternalField(0)); 851 return reinterpret_cast<icu::Collator*>(obj->GetEmbedderField(0));
852 } 852 }
853 853
854 void Collator::DeleteCollator(const v8::WeakCallbackInfo<void>& data) { 854 void Collator::DeleteCollator(const v8::WeakCallbackInfo<void>& data) {
855 delete reinterpret_cast<icu::Collator*>(data.GetInternalField(0)); 855 delete reinterpret_cast<icu::Collator*>(data.GetInternalField(0));
856 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter())); 856 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter()));
857 } 857 }
858 858
859 icu::BreakIterator* V8BreakIterator::InitializeBreakIterator( 859 icu::BreakIterator* V8BreakIterator::InitializeBreakIterator(
860 Isolate* isolate, Handle<String> locale, Handle<JSObject> options, 860 Isolate* isolate, Handle<String> locale, Handle<JSObject> options,
861 Handle<JSObject> resolved) { 861 Handle<JSObject> resolved) {
(...skipping 30 matching lines...) Expand all
892 } else { 892 } else {
893 SetResolvedBreakIteratorSettings( 893 SetResolvedBreakIteratorSettings(
894 isolate, icu_locale, break_iterator, resolved); 894 isolate, icu_locale, break_iterator, resolved);
895 } 895 }
896 896
897 return break_iterator; 897 return break_iterator;
898 } 898 }
899 899
900 icu::BreakIterator* V8BreakIterator::UnpackBreakIterator(Isolate* isolate, 900 icu::BreakIterator* V8BreakIterator::UnpackBreakIterator(Isolate* isolate,
901 Handle<JSObject> obj) { 901 Handle<JSObject> obj) {
902 return reinterpret_cast<icu::BreakIterator*>(obj->GetInternalField(0)); 902 return reinterpret_cast<icu::BreakIterator*>(obj->GetEmbedderField(0));
903 } 903 }
904 904
905 void V8BreakIterator::DeleteBreakIterator( 905 void V8BreakIterator::DeleteBreakIterator(
906 const v8::WeakCallbackInfo<void>& data) { 906 const v8::WeakCallbackInfo<void>& data) {
907 delete reinterpret_cast<icu::BreakIterator*>(data.GetInternalField(0)); 907 delete reinterpret_cast<icu::BreakIterator*>(data.GetInternalField(0));
908 delete reinterpret_cast<icu::UnicodeString*>(data.GetInternalField(1)); 908 delete reinterpret_cast<icu::UnicodeString*>(data.GetInternalField(1));
909 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter())); 909 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter()));
910 } 910 }
911 911
912 } // namespace internal 912 } // namespace internal
913 } // namespace v8 913 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698