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; |