File tree Expand file tree Collapse file tree 5 files changed +73
-0
lines changed Expand file tree Collapse file tree 5 files changed +73
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,12 @@ Encoder::Encode()
170
170
171
171
if (instr->m_opcode == Js::OpCode::InlineeStart)
172
172
{
173
+ Assert (!instr->isInlineeEntryInstr );
174
+ if (pragmaInstr)
175
+ {
176
+ m_pragmaInstrToRecordMap->Add (pragmaInstr);
177
+ pragmaInstr = nullptr ;
178
+ }
173
179
Func* inlinee = instr->m_func ;
174
180
if (inlinee->frameInfo && inlinee->frameInfo ->record )
175
181
{
Original file line number Diff line number Diff line change
1
+ //-------------------------------------------------------------------------------------------------------
2
+ // Copyright (C) Microsoft. All rights reserved.
3
+ // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4
+ //-------------------------------------------------------------------------------------------------------
5
+
6
+ function TrimStackTracePath ( line ) {
7
+ return line && line . replace ( / \( .+ \\ t e s t .S t a c k T r a c e ./ ig, "(" ) ;
8
+ }
Original file line number Diff line number Diff line change 226
226
<baseline >builtInApplyTarget.baseline</baseline >
227
227
</default >
228
228
</test >
229
+ <test >
230
+ <default >
231
+ <files >stackTrace.js</files >
232
+ <compile-flags >-extendederrorstackfortesthost</compile-flags >
233
+ <baseline >stackTrace.baseline</baseline >
234
+ </default >
235
+ </test >
229
236
</regress-exe >
Original file line number Diff line number Diff line change
1
+ ReferenceError: 'argMath5' is undefined
2
+ at func0 (stacktrace.js:31:7)
3
+ at func4 (stacktrace.js:27:5)
4
+ at test0 (stacktrace.js:39:3)
5
+ at Global code (stacktrace.js:43:3)
Original file line number Diff line number Diff line change
1
+ //-------------------------------------------------------------------------------------------------------
2
+ // Copyright (C) Microsoft. All rights reserved.
3
+ // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4
+ //-------------------------------------------------------------------------------------------------------
5
+
6
+ if ( this . WScript && this . WScript . LoadScriptFile ) {
7
+ this . WScript . LoadScriptFile ( "TrimStackTracePath.js" ) ;
8
+ }
9
+
10
+ function Dump ( output )
11
+ {
12
+ if ( this . WScript )
13
+ {
14
+ WScript . Echo ( output ) ;
15
+ }
16
+ else
17
+ {
18
+ alert ( output ) ;
19
+ }
20
+ }
21
+
22
+ function test0 ( ) {
23
+ var obj0 = { } ;
24
+
25
+ var func4 = function ( ) {
26
+ var a = ui8 ;
27
+ func0 ( ) ;
28
+ } ;
29
+ var func0 = function ( ) {
30
+ for ( ; prop0 < 100 ; ) {
31
+ argMath5 ;
32
+ }
33
+ }
34
+ obj0 . method1 = func4 ;
35
+ var ui8 = new Uint8Array ( 256 ) ;
36
+ prop0 = Infinity ;
37
+ obj0 . method1 ( ) ;
38
+ prop0 = - 1766989739 ;
39
+ obj0 . method1 ( ) ;
40
+ }
41
+
42
+ try {
43
+ test0 ( ) ;
44
+ } catch ( e ) {
45
+ Dump ( TrimStackTracePath ( e . stack ) ) ;
46
+ }
47
+
You can’t perform that action at this time.
0 commit comments