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 12884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12895 kElementCount); | 12895 kElementCount); |
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 if (array_type == kExternalDoubleArray || | 12905 if (array_type == v8::kExternalDoubleArray || |
12906 array_type == kExternalFloatArray) { | 12906 array_type == v8::kExternalFloatArray) { |
12907 CHECK_EQ( | 12907 CHECK_EQ( |
12908 static_cast<int>(0x80000000), | 12908 static_cast<int>(0x80000000), |
12909 static_cast<int>(jsobj->GetElement(7)->ToObjectChecked()->Number())); | 12909 static_cast<int>(jsobj->GetElement(7)->ToObjectChecked()->Number())); |
12910 } else { | 12910 } else { |
12911 CHECK_EQ(0, static_cast<int>( | 12911 CHECK_EQ(0, static_cast<int>( |
12912 jsobj->GetElement(7)->ToObjectChecked()->Number())); | 12912 jsobj->GetElement(7)->ToObjectChecked()->Number())); |
12913 } | 12913 } |
12914 | 12914 |
12915 result = CompileRun("for (var i = 0; i < 8; i++) {" | 12915 result = CompileRun("for (var i = 0; i < 8; i++) {" |
12916 " ext_array[6] = '2.3';" | 12916 " ext_array[6] = '2.3';" |
(...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16090 CompileRun("throw 'exception';"); | 16090 CompileRun("throw 'exception';"); |
16091 } | 16091 } |
16092 | 16092 |
16093 | 16093 |
16094 TEST(CallCompletedCallbackTwoExceptions) { | 16094 TEST(CallCompletedCallbackTwoExceptions) { |
16095 v8::HandleScope scope; | 16095 v8::HandleScope scope; |
16096 LocalContext env; | 16096 LocalContext env; |
16097 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException); | 16097 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException); |
16098 CompileRun("throw 'first exception';"); | 16098 CompileRun("throw 'first exception';"); |
16099 } | 16099 } |
OLD | NEW |