| 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 5952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5963 | 5963 |
| 5964 int expected_frame_count = 4; | 5964 int expected_frame_count = 4; |
| 5965 int expected_line_number[] = {1, 4, 7, 12}; | 5965 int expected_line_number[] = {1, 4, 7, 12}; |
| 5966 | 5966 |
| 5967 i::Handle<i::Object> compiled_script = v8::Utils::OpenHandle(*inline_script); | 5967 i::Handle<i::Object> compiled_script = v8::Utils::OpenHandle(*inline_script); |
| 5968 i::Handle<i::Script> source_script = i::Handle<i::Script>(i::Script::cast( | 5968 i::Handle<i::Script> source_script = i::Handle<i::Script>(i::Script::cast( |
| 5969 i::JSFunction::cast(*compiled_script)->shared()->script())); | 5969 i::JSFunction::cast(*compiled_script)->shared()->script())); |
| 5970 | 5970 |
| 5971 int break_id = CcTest::i_isolate()->debug()->break_id(); | 5971 int break_id = CcTest::i_isolate()->debug()->break_id(); |
| 5972 char script[128]; | 5972 char script[128]; |
| 5973 memset(script, 0, sizeof(script)); |
| 5973 i::Vector<char> script_vector(script, sizeof(script)); | 5974 i::Vector<char> script_vector(script, sizeof(script)); |
| 5974 SNPrintF(script_vector, "%%GetFrameCount(%d)", break_id); | 5975 SNPrintF(script_vector, "%%GetFrameCount(%d)", break_id); |
| 5975 v8::Local<v8::Value> result = CompileRun(script); | 5976 v8::Local<v8::Value> result = CompileRun(script); |
| 5976 | 5977 |
| 5977 int frame_count = result->Int32Value(context).FromJust(); | 5978 int frame_count = result->Int32Value(context).FromJust(); |
| 5978 CHECK_EQ(expected_frame_count, frame_count); | 5979 CHECK_EQ(expected_frame_count, frame_count); |
| 5979 | 5980 |
| 5980 for (int i = 0; i < frame_count; i++) { | 5981 for (int i = 0; i < frame_count; i++) { |
| 5981 // The 6. element in the returned array of GetFrameDetails contains the | 5982 // The 6. element in the returned array of GetFrameDetails contains the |
| 5982 // source position of that frame. | 5983 // source position of that frame. |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6731 // itself contains additional sanity checks. | 6732 // itself contains additional sanity checks. |
| 6732 for (i::Handle<i::JSFunction> fun : list) { | 6733 for (i::Handle<i::JSFunction> fun : list) { |
| 6733 bool failed = false; | 6734 bool failed = false; |
| 6734 { | 6735 { |
| 6735 i::NoSideEffectScope scope(isolate, true); | 6736 i::NoSideEffectScope scope(isolate, true); |
| 6736 failed = !isolate->debug()->PerformSideEffectCheck(fun); | 6737 failed = !isolate->debug()->PerformSideEffectCheck(fun); |
| 6737 } | 6738 } |
| 6738 if (failed) isolate->clear_pending_exception(); | 6739 if (failed) isolate->clear_pending_exception(); |
| 6739 } | 6740 } |
| 6740 } | 6741 } |
| OLD | NEW |