diff options
author | Feng Qian <fqian@google.com> | 2009-08-18 04:12:54 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-08-18 04:12:54 -0700 |
commit | 44e993977fd8e08bd1273e0152252023c25bac4d (patch) | |
tree | 79e383e259be28bf1452e57311860fb47e554ebb /V8Binding/v8/test/mjsunit/json.js | |
parent | 1f4c9d43aeeef7e66437a86ad0e92ff7b0b7f02f (diff) | |
parent | 310cbb5f146406216a2c11a235e7cc4482e282f1 (diff) | |
download | external_webkit-44e993977fd8e08bd1273e0152252023c25bac4d.zip external_webkit-44e993977fd8e08bd1273e0152252023c25bac4d.tar.gz external_webkit-44e993977fd8e08bd1273e0152252023c25bac4d.tar.bz2 |
am 310cbb5f: Update V8 to r2703.
Merge commit '310cbb5f146406216a2c11a235e7cc4482e282f1' into eclair-plus-aosp
* commit '310cbb5f146406216a2c11a235e7cc4482e282f1':
Update V8 to r2703.
Diffstat (limited to 'V8Binding/v8/test/mjsunit/json.js')
-rw-r--r-- | V8Binding/v8/test/mjsunit/json.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/V8Binding/v8/test/mjsunit/json.js b/V8Binding/v8/test/mjsunit/json.js index 4758264..bf44f78 100644 --- a/V8Binding/v8/test/mjsunit/json.js +++ b/V8Binding/v8/test/mjsunit/json.js @@ -195,3 +195,13 @@ assertEquals('{"y":6,"x":5}', JSON.stringify({x:5,y:6}, ['y', 'x'])); assertEquals(undefined, JSON.stringify(undefined)); assertEquals(undefined, JSON.stringify(function () { })); + +function checkIllegal(str) { + assertThrows(function () { JSON.parse(str); }, SyntaxError); +} + +checkIllegal('1); throw "foo"; (1'); + +var x = 0; +eval("(1); x++; (1)"); +checkIllegal('1); x++; (1'); |