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 6632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6643 v8::debug::Coverage::ScriptData script_data = coverage.GetScriptData(0); | 6643 v8::debug::Coverage::ScriptData script_data = coverage.GetScriptData(0); |
6644 v8::Local<v8::debug::Script> script = script_data.GetScript(); | 6644 v8::Local<v8::debug::Script> script = script_data.GetScript(); |
6645 CHECK(script->Source() | 6645 CHECK(script->Source() |
6646 .ToLocalChecked() | 6646 .ToLocalChecked() |
6647 ->Equals(env.local(), source) | 6647 ->Equals(env.local(), source) |
6648 .FromMaybe(false)); | 6648 .FromMaybe(false)); |
6649 | 6649 |
6650 CHECK_EQ(2u, script_data.FunctionCount()); | 6650 CHECK_EQ(2u, script_data.FunctionCount()); |
6651 v8::debug::Coverage::FunctionData function_data = | 6651 v8::debug::Coverage::FunctionData function_data = |
6652 script_data.GetFunctionData(0); | 6652 script_data.GetFunctionData(0); |
6653 CHECK_EQ(0, function_data.Start().GetLineNumber()); | 6653 v8::debug::Location start = |
6654 CHECK_EQ(0, function_data.Start().GetColumnNumber()); | 6654 script->GetSourceLocation(function_data.StartOffset()); |
6655 CHECK_EQ(3, function_data.End().GetLineNumber()); | 6655 v8::debug::Location end = |
6656 CHECK_EQ(4, function_data.End().GetColumnNumber()); | 6656 script->GetSourceLocation(function_data.EndOffset()); |
| 6657 CHECK_EQ(0, start.GetLineNumber()); |
| 6658 CHECK_EQ(0, start.GetColumnNumber()); |
| 6659 CHECK_EQ(3, end.GetLineNumber()); |
| 6660 CHECK_EQ(4, end.GetColumnNumber()); |
6657 CHECK_EQ(1, function_data.Count()); | 6661 CHECK_EQ(1, function_data.Count()); |
6658 | 6662 |
6659 function_data = script_data.GetFunctionData(1); | 6663 function_data = script_data.GetFunctionData(1); |
6660 CHECK_EQ(0, function_data.Start().GetLineNumber()); | 6664 start = script->GetSourceLocation(function_data.StartOffset()); |
6661 CHECK_EQ(0, function_data.Start().GetColumnNumber()); | 6665 end = script->GetSourceLocation(function_data.EndOffset()); |
6662 CHECK_EQ(1, function_data.End().GetLineNumber()); | 6666 CHECK_EQ(0, start.GetLineNumber()); |
6663 CHECK_EQ(1, function_data.End().GetColumnNumber()); | 6667 CHECK_EQ(0, start.GetColumnNumber()); |
| 6668 CHECK_EQ(1, end.GetLineNumber()); |
| 6669 CHECK_EQ(1, end.GetColumnNumber()); |
6664 CHECK_EQ(2, function_data.Count()); | 6670 CHECK_EQ(2, function_data.Count()); |
6665 } | 6671 } |
OLD | NEW |