Changeset 199939 in webkit for trunk/Source/JavaScriptCore/runtime/CodeCache.cpp
- Timestamp:
- Apr 22, 2016, 5:40:43 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/CodeCache.cpp
r199848 r199939 25 25 26 26 #include "config.h" 27 28 27 #include "CodeCache.h" 29 28 30 29 #include "BytecodeGenerator.h" 31 #include "CodeSpecializationKind.h"32 #include "ExecutableInfo.h"33 30 #include "JSCInlines.h" 34 31 #include "Parser.h" … … 100 97 unsigned endColumn = unlinkedCodeBlock->endColumn() + (endColumnIsOnStartLine ? startColumn : 1); 101 98 executable->recordParse(unlinkedCodeBlock->codeFeatures(), unlinkedCodeBlock->hasCapturedVariables(), firstLine, firstLine + lineCount, startColumn, endColumn); 99 source.provider()->setSourceURLDirective(unlinkedCodeBlock->sourceURLDirective()); 100 source.provider()->setSourceMappingURLDirective(unlinkedCodeBlock->sourceMappingURLDirective()); 102 101 return unlinkedCodeBlock; 103 102 } … … 119 118 UnlinkedCodeBlockType* unlinkedCodeBlock = UnlinkedCodeBlockType::create(&vm, executable->executableInfo()); 120 119 unlinkedCodeBlock->recordParse(rootNode->features(), rootNode->hasCapturedVariables(), rootNode->firstLine() - source.firstLine(), lineCount, unlinkedEndColumn); 120 unlinkedCodeBlock->setSourceURLDirective(source.provider()->sourceURL()); 121 unlinkedCodeBlock->setSourceMappingURLDirective(source.provider()->sourceMappingURL()); 121 122 122 123 error = BytecodeGenerator::generate(vm, rootNode.get(), unlinkedCodeBlock, debuggerMode, profilerMode, variablesUnderTDZ); … … 157 158 JSParserStrictMode::NotStrict); 158 159 SourceCodeValue* cache = m_sourceCode.findCacheAndUpdateAge(key); 159 if (cache) 160 return jsCast<UnlinkedFunctionExecutable*>(cache->cell.get()); 160 if (cache) { 161 UnlinkedFunctionExecutable* executable = jsCast<UnlinkedFunctionExecutable*>(cache->cell.get()); 162 source.provider()->setSourceURLDirective(executable->sourceURLDirective()); 163 source.provider()->setSourceMappingURLDirective(executable->sourceMappingURLDirective()); 164 return executable; 165 } 161 166 162 167 JSTextPosition positionBeforeLastNewline; … … 194 199 UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, metadata, UnlinkedNormalFunction, ConstructAbility::CanConstruct, emptyTDZVariables, DerivedContextType::None); 195 200 201 functionExecutable->setSourceURLDirective(source.provider()->sourceURL()); 202 functionExecutable->setSourceMappingURLDirective(source.provider()->sourceMappingURL()); 203 196 204 m_sourceCode.addCache(key, SourceCodeValue(vm, functionExecutable, m_sourceCode.age())); 197 205 return functionExecutable;
Note:
See TracChangeset
for help on using the changeset viewer.