OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 12885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12896 result = CompileRun(test_buf.start()); | 12896 result = CompileRun(test_buf.start()); |
12897 CHECK_EQ(false, result->BooleanValue()); | 12897 CHECK_EQ(false, result->BooleanValue()); |
12898 | 12898 |
12899 // Check other boundary conditions, values and operations. | 12899 // Check other boundary conditions, values and operations. |
12900 result = CompileRun("for (var i = 0; i < 8; i++) {" | 12900 result = CompileRun("for (var i = 0; i < 8; i++) {" |
12901 " ext_array[7] = undefined;" | 12901 " ext_array[7] = undefined;" |
12902 "}" | 12902 "}" |
12903 "ext_array[7];"); | 12903 "ext_array[7];"); |
12904 CHECK_EQ(0, result->Int32Value()); | 12904 CHECK_EQ(0, result->Int32Value()); |
12905 CHECK_EQ( | 12905 CHECK_EQ( |
12906 0, static_cast<int>(jsobj->GetElement(7)->ToObjectChecked()->Number())); | 12906 (int)0x80000000, |
| 12907 static_cast<int>(jsobj->GetElement(7)->ToObjectChecked()->Number())); |
12907 | 12908 |
12908 result = CompileRun("for (var i = 0; i < 8; i++) {" | 12909 result = CompileRun("for (var i = 0; i < 8; i++) {" |
12909 " ext_array[6] = '2.3';" | 12910 " ext_array[6] = '2.3';" |
12910 "}" | 12911 "}" |
12911 "ext_array[6];"); | 12912 "ext_array[6];"); |
12912 CHECK_EQ(2, result->Int32Value()); | 12913 CHECK_EQ(2, result->Int32Value()); |
12913 CHECK_EQ( | 12914 CHECK_EQ( |
12914 2, static_cast<int>(jsobj->GetElement(6)->ToObjectChecked()->Number())); | 12915 2, static_cast<int>(jsobj->GetElement(6)->ToObjectChecked()->Number())); |
12915 | 12916 |
12916 if (array_type != v8::kExternalFloatArray && | 12917 if (array_type != v8::kExternalFloatArray && |
(...skipping 3159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16076 CompileRun("throw 'exception';"); | 16077 CompileRun("throw 'exception';"); |
16077 } | 16078 } |
16078 | 16079 |
16079 | 16080 |
16080 TEST(CallCompletedCallbackTwoExceptions) { | 16081 TEST(CallCompletedCallbackTwoExceptions) { |
16081 v8::HandleScope scope; | 16082 v8::HandleScope scope; |
16082 LocalContext env; | 16083 LocalContext env; |
16083 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException); | 16084 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException); |
16084 CompileRun("throw 'first exception';"); | 16085 CompileRun("throw 'first exception';"); |
16085 } | 16086 } |
OLD | NEW |