summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/parser/Parser.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-11-29 12:18:48 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-29 12:18:57 +0100
commit4c01d0526ba4dd8cff0c0ff22a6f0ab5eb973064 (patch)
treebed2fe914fe0f7ec70abfb47d2d84af8a3604d09 /Source/JavaScriptCore/parser/Parser.cpp
parent01485457c9a5da3f1121015afd25bb53af77662e (diff)
downloadqtwebkit-4c01d0526ba4dd8cff0c0ff22a6f0ab5eb973064.tar.gz
Imported WebKit commit c60cfe0fc09efd257aa0111d7b133b02deb8a63e (http://svn.webkit.org/repository/webkit/trunk@136119)
New snapshot that includes the fix for installing the QtWebProcess into libexec Change-Id: I01344e079cbdac5678c4cba6ffcc05f4597cf0d7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/parser/Parser.cpp')
-rw-r--r--Source/JavaScriptCore/parser/Parser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/parser/Parser.cpp b/Source/JavaScriptCore/parser/Parser.cpp
index 049a51939..cf3cb4e4f 100644
--- a/Source/JavaScriptCore/parser/Parser.cpp
+++ b/Source/JavaScriptCore/parser/Parser.cpp
@@ -812,6 +812,7 @@ template <FunctionRequirements requirements, bool nameIsInContainingScope, class
{
AutoPopScopeRef functionScope(this, pushScope());
functionScope->setIsFunction();
+ int functionStart = m_token.m_location.startOffset;
if (match(IDENT)) {
name = m_token.m_data.ident;
next();
@@ -865,7 +866,7 @@ template <FunctionRequirements requirements, bool nameIsInContainingScope, class
OwnPtr<SourceProviderCacheItem> newInfo;
int functionLength = closeBracePos - openBracePos;
if (TreeBuilder::CanUseFunctionCache && m_functionCache && functionLength > minimumFunctionLengthToCache) {
- newInfo = adoptPtr(new SourceProviderCacheItem(m_token.m_location.line, closeBracePos));
+ newInfo = adoptPtr(new SourceProviderCacheItem(functionStart, m_token.m_location.line, closeBracePos));
functionScope->saveFunctionInfo(newInfo.get());
}