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

Side by Side Diff: src/i18n.cc

Issue 636493004: Revert Add a use counter for Intl.v8BreakIterator https://codereview.chromium.org/619913002/ (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase 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
636 return break_iterator; 634 return break_iterator;
637 } 635 }
638 636
639 637
640 void SetResolvedBreakIteratorSettings(Isolate* isolate, 638 void SetResolvedBreakIteratorSettings(Isolate* isolate,
641 const icu::Locale& icu_locale, 639 const icu::Locale& icu_locale,
642 icu::BreakIterator* break_iterator, 640 icu::BreakIterator* break_iterator,
643 Handle<JSObject> resolved) { 641 Handle<JSObject> resolved) {
644 Factory* factory = isolate->factory(); 642 Factory* factory = isolate->factory();
645 UErrorCode status = U_ZERO_ERROR; 643 UErrorCode status = U_ZERO_ERROR;
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 923
926 924
927 void BreakIterator::DeleteBreakIterator( 925 void BreakIterator::DeleteBreakIterator(
928 const v8::WeakCallbackData<v8::Value, void>& data) { 926 const v8::WeakCallbackData<v8::Value, void>& data) {
929 DeleteNativeObjectAt<icu::BreakIterator>(data, 0); 927 DeleteNativeObjectAt<icu::BreakIterator>(data, 0);
930 DeleteNativeObjectAt<icu::UnicodeString>(data, 1); 928 DeleteNativeObjectAt<icu::UnicodeString>(data, 1);
931 DestroyGlobalHandle(data); 929 DestroyGlobalHandle(data);
932 } 930 }
933 931
934 } } // namespace v8::internal 932 } } // 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