[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

barraclough at apple.com barraclough at apple.com
Wed Dec 22 16:09:37 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit eb3501bc7667a51496d3e51c9f009c7e3f693f5c
Author: barraclough at apple.com <barraclough at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 19 04:33:17 2010 +0000

    Bug 49577 - Function.prototype should be non-configurable
    
    Rubber stamped by Geoff Garen.
    
    Ooops, Function.prototype should not be enumerable!
    
    JavaScriptCore:
    
    * runtime/JSFunction.cpp:
    (JSC::JSFunction::getOwnPropertySlot):
    
    LayoutTests:
    
    * fast/js/function-prototype-descriptor-expected.txt:
    * fast/js/script-tests/function-prototype-descriptor.js:
    (test):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72362 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 7644cd7..820cad8 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,16 @@
 2010-11-18  Gavin Barraclough  <barraclough at apple.com>
 
+        Rubber stamped by Geoff Garen.
+
+        Bug 49577 - Function.prototype should be non-configurable
+
+        Ooops, Function.prototype should not be enumerable!
+
+        * runtime/JSFunction.cpp:
+        (JSC::JSFunction::getOwnPropertySlot):
+
+2010-11-18  Gavin Barraclough  <barraclough at apple.com>
+
         Reviewed by Oliver Hunt.
 
         Bug 49708 - Stop recompiling functions to regenerate exception info.
diff --git a/JavaScriptCore/runtime/JSFunction.cpp b/JavaScriptCore/runtime/JSFunction.cpp
index ba89d04..99f8e6f 100644
--- a/JavaScriptCore/runtime/JSFunction.cpp
+++ b/JavaScriptCore/runtime/JSFunction.cpp
@@ -208,7 +208,7 @@ bool JSFunction::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN
         if (!location) {
             JSObject* prototype = new (exec) JSObject(scope().globalObject()->emptyObjectStructure());
             prototype->putDirect(exec->propertyNames().constructor, this, DontEnum);
-            putDirect(exec->propertyNames().prototype, prototype, DontDelete);
+            putDirect(exec->propertyNames().prototype, prototype, DontDelete | DontEnum);
             location = getDirectLocation(propertyName);
         }
 
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ae3047c..c8a5a94 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-18  Gavin Barraclough  <barraclough at apple.com>
+
+        Rubber stamped by Geoff Garen.
+
+        Bug 49577 - Function.prototype should be non-configurable
+
+        Ooops, Function.prototype should not be enumerable!
+
+        * fast/js/function-prototype-descriptor-expected.txt:
+        * fast/js/script-tests/function-prototype-descriptor.js:
+        (test):
+
 2010-11-18  David Levin  <levin at chromium.org>
 
         [chromium] Misc test updates (most Ruby).
diff --git a/LayoutTests/fast/js/function-prototype-descriptor-expected.txt b/LayoutTests/fast/js/function-prototype-descriptor-expected.txt
index 1489fcd..d73342f 100644
--- a/LayoutTests/fast/js/function-prototype-descriptor-expected.txt
+++ b/LayoutTests/fast/js/function-prototype-descriptor-expected.txt
@@ -4,14 +4,14 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS descriptor['writable'] is true
-PASS descriptor['enumerable'] is true
+PASS descriptor['enumerable'] is false
 PASS descriptor['configurable'] is false
 PASS descriptor['writable'] is true
-PASS descriptor['enumerable'] is true
+PASS descriptor['enumerable'] is false
 PASS descriptor['configurable'] is false
 PASS Object.defineProperty(c, 'prototype', { get: function(){} }) threw exception TypeError: Attempting to change access mechanism for an unconfigurable property..
 PASS descriptor['writable'] is true
-PASS descriptor['enumerable'] is true
+PASS descriptor['enumerable'] is false
 PASS descriptor['configurable'] is false
 PASS successfullyParsed is true
 
diff --git a/LayoutTests/fast/js/script-tests/function-prototype-descriptor.js b/LayoutTests/fast/js/script-tests/function-prototype-descriptor.js
index 349f590..18bffa2 100644
--- a/LayoutTests/fast/js/script-tests/function-prototype-descriptor.js
+++ b/LayoutTests/fast/js/script-tests/function-prototype-descriptor.js
@@ -6,9 +6,9 @@ function test(func)
 {
     // test function.prototype has the correct attributes - writable, enumerable, non-configurable.
     descriptor = Object.getOwnPropertyDescriptor(func, 'prototype');
-    shouldBe("descriptor['writable']", "true")
-    shouldBe("descriptor['enumerable']", "true")
-    shouldBe("descriptor['configurable']", "false")
+    shouldBeTrue("descriptor['writable']");
+    shouldBeFalse("descriptor['enumerable']");
+    shouldBeFalse("descriptor['configurable']");
 }
 
 // Test prototype's attributes are correct.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list