Commit f6ef9d7
Kevin Smith
[MERGE #6227 @zenparsing] Do not attempt to reuse Utf8SourceInfo if asmjs parse fails
Merge pull request #6227 from zenparsing:asm-error-utf8source-2
Fixes #6222
When an asmjs parse fails, we reparse with asmjs disabled. However, currently we are reusing the same Utf8SourceInfo data, which contains a dictionary of FunctionBody objects. FunctionBody objects that were added in the first parse are still present in the source info dictionary. This causes an assert to fire in `DebugContext.cpp` because it expects there to be only one FunctionBody per source code function.
This PR simply discards the old Utf8SourceInfo when an asmjs parse fails. The downside is that the source data has to be re-memcpyd. Another (more complex) solution would be to try to fully clear out the existing Utf8SourceInfo.2 files changed
+12
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1995 | 1995 | | |
1996 | 1996 | | |
1997 | 1997 | | |
1998 | | - | |
1999 | | - | |
2000 | 1998 | | |
2001 | | - | |
2002 | | - | |
2003 | | - | |
2004 | | - | |
2005 | | - | |
2006 | | - | |
2007 | | - | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
2008 | 2006 | | |
2009 | | - | |
2010 | | - | |
2011 | | - | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
2015 | 2012 | | |
2016 | 2013 | | |
2017 | 2014 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | 151 | | |
160 | 152 | | |
161 | 153 | | |
| |||
0 commit comments