| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ac9a893 commit e2cd110
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,7 +38,7 @@ | |||
| 38 | 38 | ||
| 39 | 39 | # Reset this number to 0 on major V8 upgrades. | |
| 40 | 40 | # Increment by one for each non-official patch applied to deps/v8. | |
| 41 | - 'v8_embedder_string': '-node.30', | ||
| 41 | + 'v8_embedder_string': '-node.31', | ||
| 42 | 42 | ||
| 43 | 43 | ##### V8 defaults for Node.js ##### | |
| 44 | 44 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4087,6 +4087,7 @@ void ParserBase<Impl>::ParseFunctionBody( | |||
| 4087 | 4087 | inner_body.Rewind(); | |
| 4088 | 4088 | inner_body.Add(inner_block); | |
| 4089 | 4089 | inner_block->set_scope(inner_scope); | |
| 4090 | + impl()->RecordBlockSourceRange(inner_block, scope()->end_position()); | ||
| 4090 | 4091 | if (!impl()->HasCheckedSyntax()) { | |
| 4091 | 4092 | const AstRawString* conflict = inner_scope->FindVariableDeclaredIn( | |
| 4092 | 4093 | function_scope, VariableMode::kLastLexicalVariableMode); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1097,4 +1097,41 @@ f(43); // 0450 | |||
| 1097 | 1097 | {"start":204,"end":226,"count":1}] | |
| 1098 | 1098 | ); | |
| 1099 | 1099 | ||
| 1100 | + TestCoverage( | ||
| 1101 | + "https://crbug.com/v8/9857", | ||
| 1102 | + `function foo() {function bar() {}}; foo()`, | ||
| 1103 | + [{"start":0,"end":41,"count":1}, | ||
| 1104 | + {"start":0,"end":34,"count":1}, | ||
| 1105 | + {"start":16,"end":33,"count":0}] | ||
| 1106 | + ); | ||
| 1107 | + | ||
| 1108 | + TestCoverage( | ||
| 1109 | + "https://crbug.com/v8/9952", | ||
| 1110 | + ` | ||
| 1111 | + function test(foo = "foodef") { // 0000 | ||
| 1112 | + return {bar}; // 0050 | ||
| 1113 | + // 0100 | ||
| 1114 | + function bar() { // 0150 | ||
| 1115 | + console.log("test"); // 0200 | ||
| 1116 | + } // 0250 | ||
| 1117 | + } // 0300 | ||
| 1118 | + test().bar(); // 0350`, | ||
| 1119 | + [{"start":0,"end":399,"count":1}, | ||
| 1120 | + {"start":0,"end":301,"count":1}, | ||
| 1121 | + {"start":152,"end":253,"count":1}]); | ||
| 1122 | + | ||
| 1123 | + TestCoverage( | ||
| 1124 | + "https://crbug.com/v8/9952", | ||
| 1125 | + ` | ||
| 1126 | + function test(foo = (()=>{})) { // 0000 | ||
| 1127 | + return {foo}; // 0050 | ||
| 1128 | + } // 0100 | ||
| 1129 | + // 0150 | ||
| 1130 | + test(()=>{}).foo(); // 0200`, | ||
| 1131 | + [{"start":0,"end":249,"count":1}, | ||
| 1132 | + {"start":0,"end":101,"count":1}, | ||
| 1133 | + {"start":21,"end":27,"count":0}, | ||
| 1134 | + {"start":205,"end":211,"count":1}] | ||
| 1135 | + ); | ||
| 1136 | + | ||
| 1100 | 1137 | %DebugToggleBlockCoverage(false); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments