Changeset 167313 in webkit for trunk/Source/JavaScriptCore/parser/Parser.cpp
- Timestamp:
- Apr 15, 2014, 10:46:42 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/Parser.cpp
r167199 r167313 193 193 194 194 template <typename LexerType> 195 Parser<LexerType>::Parser(VM* vm, const SourceCode& source, FunctionParameters* parameters, const Identifier& name, JSParserStrictness strictness, JSParserMode parserMode , JSFunctionKind functionKind)195 Parser<LexerType>::Parser(VM* vm, const SourceCode& source, FunctionParameters* parameters, const Identifier& name, JSParserStrictness strictness, JSParserMode parserMode) 196 196 : m_vm(vm) 197 197 , m_source(&source) … … 208 208 , m_parsingBuiltin(strictness == JSParseBuiltin) 209 209 { 210 m_lexer = adoptPtr(new LexerType(vm, strictness , functionKind));210 m_lexer = adoptPtr(new LexerType(vm, strictness)); 211 211 m_arena = m_vm->parserArena.get(); 212 212 m_lexer->setCode(source, m_arena); … … 284 284 Vector<RefPtr<StringImpl>> closedVariables; 285 285 if (m_parsingBuiltin) { 286 RELEASE_ASSERT(!capturedVariables.size()); 286 287 IdentifierSet usedVariables; 287 288 scope->getUsedVariables(usedVariables); … … 293 294 continue; 294 295 closedVariables.append(variable); 295 }296 if (!capturedVariables.isEmpty()) {297 for (const auto& capturedVariable : capturedVariables) {298 if (scope->hasDeclaredVariable(Identifier(m_vm, capturedVariable.get())))299 continue;300 301 if (scope->hasDeclaredParameter(Identifier(m_vm, capturedVariable.get())))302 continue;303 RELEASE_ASSERT_NOT_REACHED();304 }305 296 } 306 297 }
Note:
See TracChangeset
for help on using the changeset viewer.