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

Unified Diff: test/mjsunit/regress/regress-2931.js

Issue 27238009: Do not look up ArrayBuffer on global object in typed array constructor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/typedarray.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-2931.js
diff --git a/test/mjsunit/regress/regress-294.js b/test/mjsunit/regress/regress-2931.js
similarity index 88%
copy from test/mjsunit/regress/regress-294.js
copy to test/mjsunit/regress/regress-2931.js
index 285b447fb570a771a4aa6eb308ead47e3a62ced7..a2ea912682dacb545fc304462b7c2055ea2a9932 100644
--- a/test/mjsunit/regress/regress-294.js
+++ b/test/mjsunit/regress/regress-2931.js
@@ -25,19 +25,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Should not crash.
+// Typed array constructors should be immune from changes to
+// value of ArrayBuffer on global object.
// See http://code.google.com/p/v8/issues/detail?id=294
-function f() { return false; }
-
-function test(x) {
- var y = x;
- if (x == "kat") x = "kat";
- else {
- x = "hund";
- var z = f();
- if (!z) x = "kat";
- }
-}
-
-test("hund");
+this.ArrayBuffer = function() { throw Error('BAM'); };
+var u8 = new Uint8Array(100);
+assertSame(100, u8.byteLength);
« no previous file with comments | « src/typedarray.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698