Changeset 132143 in webkit for trunk/Source/JavaScriptCore/parser/Parser.cpp
- Timestamp:
- Oct 22, 2012, 3:09:58 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/Parser.cpp
r131236 r132143 40 40 #define failWithMessage(msg) do { if (!m_error) updateErrorMessage(msg); return 0; } while (0) 41 41 #define failWithNameAndMessage(before, name, after) do { if (!m_error) updateErrorWithNameAndMessage(before, name, after); return 0; } while (0) 42 #define failWithStackOverflow() do { m_error = true; m_hasStackOverflow = true; return 0; } while (0) 42 43 #define failIfFalse(cond) do { if (!(cond)) fail(); } while (0) 43 44 #define failIfFalseWithMessage(cond, msg) do { if (!(cond)) failWithMessage(msg); } while (0) … … 55 56 #define consumeOrFailWithFlags(tokenType, flags) do { if (!consume(tokenType, flags)) failWithToken(tokenType); } while (0) 56 57 #define matchOrFail(tokenType) do { if (!match(tokenType)) failWithToken(tokenType); } while (0) 57 #define failIfStackOverflow() do { failIfFalseWithMessage(canRecurse(), "Code nested too deeply."); } while (0)58 #define failIfStackOverflow() do { if (!canRecurse()) failWithStackOverflow(); } while (0) 58 59 59 60 using namespace std; … … 66 67 , m_source(&source) 67 68 , m_stack(wtfThreadData().stack()) 69 , m_hasStackOverflow(false) 68 70 , m_error(false) 69 71 , m_errorMessage("Parse error")
Note:
See TracChangeset
for help on using the changeset viewer.