OLD | NEW |
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 "unicode/brkiter.h" | 8 #include "unicode/brkiter.h" |
9 #include "unicode/calendar.h" | 9 #include "unicode/calendar.h" |
10 #include "unicode/coll.h" | 10 #include "unicode/coll.h" |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 obj->GetInternalField(0)); | 731 obj->GetInternalField(0)); |
732 } | 732 } |
733 | 733 |
734 return NULL; | 734 return NULL; |
735 } | 735 } |
736 | 736 |
737 | 737 |
738 template<class T> | 738 template<class T> |
739 void DeleteNativeObjectAt(const v8::WeakCallbackData<v8::Value, void>& data, | 739 void DeleteNativeObjectAt(const v8::WeakCallbackData<v8::Value, void>& data, |
740 int index) { | 740 int index) { |
741 v8::Local<v8::Object> obj = v8::Handle<v8::Object>::Cast(data.GetValue()); | 741 v8::Local<v8::Object> obj = v8::Local<v8::Object>::Cast(data.GetValue()); |
742 delete reinterpret_cast<T*>(obj->GetAlignedPointerFromInternalField(index)); | 742 delete reinterpret_cast<T*>(obj->GetAlignedPointerFromInternalField(index)); |
743 } | 743 } |
744 | 744 |
745 | 745 |
746 static void DestroyGlobalHandle( | 746 static void DestroyGlobalHandle( |
747 const v8::WeakCallbackData<v8::Value, void>& data) { | 747 const v8::WeakCallbackData<v8::Value, void>& data) { |
748 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter())); | 748 GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter())); |
749 } | 749 } |
750 | 750 |
751 | 751 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 | 942 |
943 void BreakIterator::DeleteBreakIterator( | 943 void BreakIterator::DeleteBreakIterator( |
944 const v8::WeakCallbackData<v8::Value, void>& data) { | 944 const v8::WeakCallbackData<v8::Value, void>& data) { |
945 DeleteNativeObjectAt<icu::BreakIterator>(data, 0); | 945 DeleteNativeObjectAt<icu::BreakIterator>(data, 0); |
946 DeleteNativeObjectAt<icu::UnicodeString>(data, 1); | 946 DeleteNativeObjectAt<icu::UnicodeString>(data, 1); |
947 DestroyGlobalHandle(data); | 947 DestroyGlobalHandle(data); |
948 } | 948 } |
949 | 949 |
950 } // namespace internal | 950 } // namespace internal |
951 } // namespace v8 | 951 } // namespace v8 |
OLD | NEW |