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

Side by Side Diff: src/i18n.cc

Issue 619913002: Add a use counter for Intl.v8BreakIterator (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-strings.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 // 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 // Defualt is word iterator. 624 // Defualt is word iterator.
625 break_iterator = 625 break_iterator =
626 icu::BreakIterator::createWordInstance(icu_locale, status); 626 icu::BreakIterator::createWordInstance(icu_locale, status);
627 } 627 }
628 628
629 if (U_FAILURE(status)) { 629 if (U_FAILURE(status)) {
630 delete break_iterator; 630 delete break_iterator;
631 return NULL; 631 return NULL;
632 } 632 }
633 633
634 isolate->CountUsage(v8::Isolate::UseCounterFeature::kBreakIterator);
635
634 return break_iterator; 636 return break_iterator;
635 } 637 }
636 638
637 639
638 void SetResolvedBreakIteratorSettings(Isolate* isolate, 640 void SetResolvedBreakIteratorSettings(Isolate* isolate,
639 const icu::Locale& icu_locale, 641 const icu::Locale& icu_locale,
640 icu::BreakIterator* break_iterator, 642 icu::BreakIterator* break_iterator,
641 Handle<JSObject> resolved) { 643 Handle<JSObject> resolved) {
642 Factory* factory = isolate->factory(); 644 Factory* factory = isolate->factory();
643 UErrorCode status = U_ZERO_ERROR; 645 UErrorCode status = U_ZERO_ERROR;
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 925
924 926
925 void BreakIterator::DeleteBreakIterator( 927 void BreakIterator::DeleteBreakIterator(
926 const v8::WeakCallbackData<v8::Value, void>& data) { 928 const v8::WeakCallbackData<v8::Value, void>& data) {
927 DeleteNativeObjectAt<icu::BreakIterator>(data, 0); 929 DeleteNativeObjectAt<icu::BreakIterator>(data, 0);
928 DeleteNativeObjectAt<icu::UnicodeString>(data, 1); 930 DeleteNativeObjectAt<icu::UnicodeString>(data, 1);
929 DestroyGlobalHandle(data); 931 DestroyGlobalHandle(data);
930 } 932 }
931 933
932 } } // namespace v8::internal 934 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698