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

Unified Diff: src/extensions/i18n/break-iterator.js

Issue 22764007: Move i18n break iterator C++ code to runtime (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/extensions/i18n/break-iterator.cc ('k') | src/extensions/i18n/i18n-extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/i18n/break-iterator.js
diff --git a/src/extensions/i18n/break-iterator.js b/src/extensions/i18n/break-iterator.js
index eefd8c2ab1ebd99c5737d7209807bac90e944d11..898bd5dedb5680b2bf9fb484abdc66ad83c16f62 100644
--- a/src/extensions/i18n/break-iterator.js
+++ b/src/extensions/i18n/break-iterator.js
@@ -35,8 +35,6 @@
* Useful for subclassing.
*/
function initializeBreakIterator(iterator, locales, options) {
- native function NativeJSCreateBreakIterator();
-
if (iterator.hasOwnProperty('__initializedIntlObject')) {
throw new TypeError('Trying to re-initialize v8BreakIterator object.');
}
@@ -59,9 +57,9 @@ function initializeBreakIterator(iterator, locales, options) {
locale: {writable: true}
});
- var internalIterator = NativeJSCreateBreakIterator(locale.locale,
- internalOptions,
- resolved);
+ var internalIterator = %CreateBreakIterator(locale.locale,
+ internalOptions,
+ resolved);
Object.defineProperty(iterator, 'iterator', {value: internalIterator});
Object.defineProperty(iterator, 'resolved', {value: resolved});
@@ -149,8 +147,7 @@ function initializeBreakIterator(iterator, locales, options) {
* gets discarded.
*/
function adoptText(iterator, text) {
- native function NativeJSBreakIteratorAdoptText();
- NativeJSBreakIteratorAdoptText(iterator.iterator, String(text));
+ %BreakIteratorAdoptText(iterator.iterator, String(text));
}
@@ -158,8 +155,7 @@ function adoptText(iterator, text) {
* Returns index of the first break in the string and moves current pointer.
*/
function first(iterator) {
- native function NativeJSBreakIteratorFirst();
- return NativeJSBreakIteratorFirst(iterator.iterator);
+ return %BreakIteratorFirst(iterator.iterator);
}
@@ -167,8 +163,7 @@ function first(iterator) {
* Returns the index of the next break and moves the pointer.
*/
function next(iterator) {
- native function NativeJSBreakIteratorNext();
- return NativeJSBreakIteratorNext(iterator.iterator);
+ return %BreakIteratorNext(iterator.iterator);
}
@@ -176,8 +171,7 @@ function next(iterator) {
* Returns index of the current break.
*/
function current(iterator) {
- native function NativeJSBreakIteratorCurrent();
- return NativeJSBreakIteratorCurrent(iterator.iterator);
+ return %BreakIteratorCurrent(iterator.iterator);
}
@@ -185,8 +179,7 @@ function current(iterator) {
* Returns type of the current break.
*/
function breakType(iterator) {
- native function NativeJSBreakIteratorBreakType();
- return NativeJSBreakIteratorBreakType(iterator.iterator);
+ return %BreakIteratorBreakType(iterator.iterator);
}
« no previous file with comments | « src/extensions/i18n/break-iterator.cc ('k') | src/extensions/i18n/i18n-extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698