Diff
Modified: trunk/LayoutTests/ChangeLog (97718 => 97719)
--- trunk/LayoutTests/ChangeLog 2011-10-18 05:04:10 UTC (rev 97718)
+++ trunk/LayoutTests/ChangeLog 2011-10-18 05:32:55 UTC (rev 97719)
@@ -1,3 +1,10 @@
+2011-10-17 Gavin Barraclough <[email protected]>
+
+ Reverted r997709, this caused test failures.
+
+ * fast/js/basic-strict-mode-expected.txt:
+ * fast/js/script-tests/basic-strict-mode.js:
+
2011-10-17 Kent Tamura <[email protected]>
[Chromium] Test expectation update
Modified: trunk/LayoutTests/fast/js/basic-strict-mode-expected.txt (97718 => 97719)
--- trunk/LayoutTests/fast/js/basic-strict-mode-expected.txt 2011-10-18 05:04:10 UTC (rev 97718)
+++ trunk/LayoutTests/fast/js/basic-strict-mode-expected.txt 2011-10-18 05:32:55 UTC (rev 97719)
@@ -66,10 +66,6 @@
PASS (function f(arg){'use strict'; f.caller; })() threw exception TypeError: Cannot access caller property of a strict mode function.
PASS (function f(arg){'use strict'; f.arguments=5; })() threw exception TypeError: Cannot access arguments property of a strict mode function.
PASS (function f(arg){'use strict'; f.caller=5; })() threw exception TypeError: Cannot access caller property of a strict mode function.
-PASS "caller" in function(){"use strict"} is true
-PASS (function(){"use strict";}).hasOwnProperty("caller") is true
-PASS "arguments" in function(){"use strict"} is true
-PASS (function(){"use strict";}).hasOwnProperty("arguments") is true
PASS 'use strict'; (function (){with(1){};}) threw exception SyntaxError: 'with' statements are not valid in strict mode.
PASS (function(){'use strict'; (function (){with(1){};})}) threw exception SyntaxError: 'with' statements are not valid in strict mode.
PASS 'use strict'; (function (){var a; delete a;}) threw exception SyntaxError: Cannot delete unqualified property 'a' in strict mode.
Modified: trunk/LayoutTests/fast/js/script-tests/basic-strict-mode.js (97718 => 97719)
--- trunk/LayoutTests/fast/js/script-tests/basic-strict-mode.js 2011-10-18 05:04:10 UTC (rev 97718)
+++ trunk/LayoutTests/fast/js/script-tests/basic-strict-mode.js 2011-10-18 05:32:55 UTC (rev 97719)
@@ -74,11 +74,6 @@
shouldThrow("(function f(arg){'use strict'; f.caller; })()");
shouldThrow("(function f(arg){'use strict'; f.arguments=5; })()");
shouldThrow("(function f(arg){'use strict'; f.caller=5; })()");
-// arguments/caller poisoning should be visible but not throw with 'in' & 'hasOwnProperty'.
-shouldBeTrue('"caller" in function(){"use strict"}');
-shouldBeTrue('(function(){"use strict";}).hasOwnProperty("caller")');
-shouldBeTrue('"arguments" in function(){"use strict"}');
-shouldBeTrue('(function(){"use strict";}).hasOwnProperty("arguments")');
shouldBeSyntaxError("'use strict'; (function (){with(1){};})");
shouldBeSyntaxError("'use strict'; (function (){var a; delete a;})");
shouldBeSyntaxError("'use strict'; var a; (function (){ delete a;})");
Modified: trunk/Source/_javascript_Core/ChangeLog (97718 => 97719)
--- trunk/Source/_javascript_Core/ChangeLog 2011-10-18 05:04:10 UTC (rev 97718)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-10-18 05:32:55 UTC (rev 97719)
@@ -1,3 +1,13 @@
+2011-10-17 Gavin Barraclough <[email protected]>
+
+ Reverted r997709, this caused test failures.
+
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ * runtime/JSObject.cpp:
+ (JSC::JSObject::hasProperty):
+ (JSC::JSObject::hasOwnProperty):
+
2011-10-17 Ryosuke Niwa <[email protected]>
Rename deregister* to unregister*
Modified: trunk/Source/_javascript_Core/jit/JITStubs.cpp (97718 => 97719)
--- trunk/Source/_javascript_Core/jit/JITStubs.cpp 2011-10-18 05:04:10 UTC (rev 97718)
+++ trunk/Source/_javascript_Core/jit/JITStubs.cpp 2011-10-18 05:32:55 UTC (rev 97719)
@@ -3607,9 +3607,7 @@
Identifier property(callFrame, propName.toString(callFrame));
CHECK_FOR_EXCEPTION();
- bool result = baseObj->hasProperty(callFrame, property);
- ASSERT(!callFrame->hadException());
- return JSValue::encode(jsBoolean(result));
+ return JSValue::encode(jsBoolean(baseObj->hasProperty(callFrame, property)));
}
DEFINE_STUB_FUNCTION(JSObject*, op_push_new_scope)
Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (97718 => 97719)
--- trunk/Source/_javascript_Core/runtime/JSObject.cpp 2011-10-18 05:04:10 UTC (rev 97718)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp 2011-10-18 05:32:55 UTC (rev 97719)
@@ -243,14 +243,14 @@
bool JSObject::hasProperty(ExecState* exec, const Identifier& propertyName) const
{
- PropertyDescriptor descriptor;
- return const_cast<JSObject*>(this)->getPropertyDescriptor(exec, propertyName, descriptor);
+ PropertySlot slot;
+ return const_cast<JSObject*>(this)->getPropertySlot(exec, propertyName, slot);
}
bool JSObject::hasProperty(ExecState* exec, unsigned propertyName) const
{
- PropertyDescriptor descriptor;
- return const_cast<JSObject*>(this)->getPropertyDescriptor(exec, Identifier::from(exec, propertyName), descriptor);
+ PropertySlot slot;
+ return const_cast<JSObject*>(this)->getPropertySlot(exec, propertyName, slot);
}
bool JSObject::deletePropertyVirtual(ExecState* exec, const Identifier& propertyName)
@@ -286,8 +286,8 @@
bool JSObject::hasOwnProperty(ExecState* exec, const Identifier& propertyName) const
{
- PropertyDescriptor descriptor;
- return const_cast<JSObject*>(this)->getOwnPropertyDescriptor(exec, propertyName, descriptor);
+ PropertySlot slot;
+ return const_cast<JSObject*>(this)->getOwnPropertySlotVirtual(exec, propertyName, slot);
}
bool JSObject::deletePropertyVirtual(ExecState* exec, unsigned propertyName)