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

Unified Diff: src/extensions/i18n/footer.js

Issue 18487004: Import the v8-i18n extension into v8 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
Index: src/extensions/i18n/footer.js
diff --git a/test/mjsunit/elide-double-hole-check-9.js b/src/extensions/i18n/footer.js
similarity index 73%
copy from test/mjsunit/elide-double-hole-check-9.js
copy to src/extensions/i18n/footer.js
index 4d277af695ce3c774af2f2a1715049810aa617dd..a08153c29344015232e9b2467669868a83e2b952 100644
--- a/test/mjsunit/elide-double-hole-check-9.js
+++ b/src/extensions/i18n/footer.js
@@ -24,26 +24,21 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// limitations under the License.
-// Flags: --allow-natives-syntax
+// ECMAScript 402 API implementation is broken into separate files for
+// each service. The build system combines them together into one
+// Intl namespace.
-var do_set = false;
+// Fix RegExp global state so we don't fail WebKit layout test:
+// fast/js/regexp-caching.html
+// It seems that 'g' or test() operations leave state changed.
+var CLEANUP_RE = new RegExp('');
+CLEANUP_RE.test('');
-function set_proto_elements() {
- try {} catch (e) {} // Don't optimize or inline
- if (do_set) Array.prototype[1] = 1.5;
-}
-
-function f(a, i) {
- set_proto_elements();
- return a[i] + 0.5;
-}
-
-var arr = [0.0,,2.5];
-assertEquals(0.5, f(arr, 0));
-assertEquals(0.5, f(arr, 0));
-%OptimizeFunctionOnNextCall(f);
-assertEquals(0.5, f(arr, 0));
-do_set = true;
-assertEquals(2, f(arr, 1));
+return Intl;
+}());
+// Alias v8Intl to Intl so we don't break existing applications.
+// TODO(cira): Remove in a couple of months (starting at Oct 1st 2012).
+var v8Intl = Intl;

Powered by Google App Engine
This is Rietveld 408576698