Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(988)

Unified Diff: test/unittests/source-position-table-unittest.cc

Issue 2248673002: Avoid accessing Isolate in source position logging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/unittests/interpreter/bytecode-array-writer-unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/source-position-table-unittest.cc
diff --git a/test/unittests/source-position-table-unittest.cc b/test/unittests/source-position-table-unittest.cc
index 33cd3795ebea151a3f6afd7e1b999e4d33b8ae96..01d96750614fe1f86b91dff86f8aa44f0a30b815 100644
--- a/test/unittests/source-position-table-unittest.cc
+++ b/test/unittests/source-position-table-unittest.cc
@@ -4,6 +4,7 @@
#include "src/v8.h"
+#include "src/objects.h"
#include "src/source-position-table.h"
#include "test/unittests/test-utils.h"
@@ -23,18 +24,19 @@ static int offsets[] = {0, 1, 2, 3, 4, 30, 31, 32,
129, 250, 1000, 9999, 12000, 31415926};
TEST_F(SourcePositionTableTest, EncodeStatement) {
- SourcePositionTableBuilder builder(isolate(), zone());
+ SourcePositionTableBuilder builder(zone());
for (int i = 0; i < arraysize(offsets); i++) {
builder.AddPosition(offsets[i], offsets[i], true);
}
// To test correctness, we rely on the assertions in ToSourcePositionTable().
// (Also below.)
- CHECK(!builder.ToSourcePositionTable().is_null());
+ CHECK(!builder.ToSourcePositionTable(isolate(), Handle<AbstractCode>())
+ .is_null());
}
TEST_F(SourcePositionTableTest, EncodeStatementDuplicates) {
- SourcePositionTableBuilder builder(isolate(), zone());
+ SourcePositionTableBuilder builder(zone());
for (int i = 0; i < arraysize(offsets); i++) {
builder.AddPosition(offsets[i], offsets[i], true);
builder.AddPosition(offsets[i], offsets[i] + 1, true);
@@ -42,19 +44,21 @@ TEST_F(SourcePositionTableTest, EncodeStatementDuplicates) {
// To test correctness, we rely on the assertions in ToSourcePositionTable().
// (Also below.)
- CHECK(!builder.ToSourcePositionTable().is_null());
+ CHECK(!builder.ToSourcePositionTable(isolate(), Handle<AbstractCode>())
+ .is_null());
}
TEST_F(SourcePositionTableTest, EncodeExpression) {
- SourcePositionTableBuilder builder(isolate(), zone());
+ SourcePositionTableBuilder builder(zone());
for (int i = 0; i < arraysize(offsets); i++) {
builder.AddPosition(offsets[i], offsets[i], false);
}
- CHECK(!builder.ToSourcePositionTable().is_null());
+ CHECK(!builder.ToSourcePositionTable(isolate(), Handle<AbstractCode>())
+ .is_null());
}
TEST_F(SourcePositionTableTest, EncodeAscending) {
- SourcePositionTableBuilder builder(isolate(), zone());
+ SourcePositionTableBuilder builder(zone());
int code_offset = 0;
int source_position = 0;
@@ -79,7 +83,8 @@ TEST_F(SourcePositionTableTest, EncodeAscending) {
}
}
- CHECK(!builder.ToSourcePositionTable().is_null());
+ CHECK(!builder.ToSourcePositionTable(isolate(), Handle<AbstractCode>())
+ .is_null());
}
} // namespace interpreter
« no previous file with comments | « test/unittests/interpreter/bytecode-array-writer-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698