[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:12:49 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit ca7af085a95153fb5dc55aa13db89d3c6b7b14e2
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 9 16:21:10 2002 +0000
Reviewed by Ken.
- fixed 3059637 - all articles missing at excite.com sports page
- fixed 3065903 - most of content missing at excite.com news page
These bugs both came up because a JavaScript function has a var
declaration that collides with a function parameter name.
* kjs/nodes.cpp:
(VarDeclNode::processVarDecls): Don't set the property to
undefined if a property with that name is already set on the
global object. Otherwise we may clobber function parameters with
undefined even before hitting a possible var initializer.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index f6c8a42..42fd5c6 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,19 @@
+2002-12-09 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Ken.
+
+ - fixed 3059637 - all articles missing at excite.com sports page
+ - fixed 3065903 - most of content missing at excite.com news page
+
+ These bugs both came up because a JavaScript function has a var
+ declaration that collides with a function parameter name.
+
+ * kjs/nodes.cpp:
+ (VarDeclNode::processVarDecls): Don't set the property to
+ undefined if a property with that name is already set on the
+ global object. Otherwise we may clobber function parameters with
+ undefined even before hitting a possible var initializer.
+
2002-12-06 Maciej Stachowiak <mjs at apple.com>
Reviewed by: Darin Adler
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index f6c8a42..42fd5c6 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,3 +1,19 @@
+2002-12-09 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Ken.
+
+ - fixed 3059637 - all articles missing at excite.com sports page
+ - fixed 3065903 - most of content missing at excite.com news page
+
+ These bugs both came up because a JavaScript function has a var
+ declaration that collides with a function parameter name.
+
+ * kjs/nodes.cpp:
+ (VarDeclNode::processVarDecls): Don't set the property to
+ undefined if a property with that name is already set on the
+ global object. Otherwise we may clobber function parameters with
+ undefined even before hitting a possible var initializer.
+
2002-12-06 Maciej Stachowiak <mjs at apple.com>
Reviewed by: Darin Adler
diff --git a/JavaScriptCore/kjs/nodes.cpp b/JavaScriptCore/kjs/nodes.cpp
index e3fc7cc..5e355a3 100644
--- a/JavaScriptCore/kjs/nodes.cpp
+++ b/JavaScriptCore/kjs/nodes.cpp
@@ -1657,7 +1657,12 @@ Value VarDeclNode::evaluate(ExecState *exec)
void VarDeclNode::processVarDecls(ExecState *exec)
{
Object variable = exec->context().imp()->variableObject();
- variable.put(exec,ident, Undefined(), DontDelete);
+
+ // If a variable by this name already exists, don't clobber it -
+ // it might be a function parameter
+ if (!variable.hasProperty(exec, ident)) {
+ variable.put(exec,ident, Undefined(), DontDelete);
+ }
}
// ------------------------------ VarDeclListNode ------------------------------
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list