Commit a928469d authored by barraclough@apple.com's avatar barraclough@apple.com
Browse files

Error.stack should not be enumerable

https://bugs.webkit.org/show_bug.cgi?id=120171

Reviewed by Oliver Hunt.

Breaks ECMA tests.

Source/JavaScriptCore: 

* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::finishCreation):
    - None -> DontEnum

LayoutTests: 

* fast/js/exception-properties-expected.txt:
* fast/js/script-tests/exception-properties.js:
    - Update test expectations.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent dd40a7eb
2013-08-22 Anton Obzhirov <a.obzhirov@samsung.com>
2013-08-22 Gavin Barraclough <barraclough@apple.com>
Error.stack should not be enumerable
https://bugs.webkit.org/show_bug.cgi?id=120171
Reviewed by Oliver Hunt.
Breaks ECMA tests.
* fast/js/exception-properties-expected.txt:
* fast/js/script-tests/exception-properties.js:
- Update test expectations.
2
013-08-22 Anton Obzhirov <a.obzhirov@samsung.com>
 
[CSSRegions] Min-width and max-width for a region should support values other than length
https://bugs.webkit.org/show_bug.cgi?id=115248
......@@ -3,7 +3,7 @@ Test for correct properties on Error objects.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS enumerableProperties(error) is ["stack"]
PASS enumerableProperties(error) is []
PASS enumerableProperties(nativeError) is ["stack", "line", "sourceURL"]
PASS Object.getPrototypeOf(nativeError).name is "RangeError"
PASS Object.getPrototypeOf(nativeError).message is ""
......
......@@ -15,7 +15,7 @@ try {
var nativeError = rangeError;
var error = new Error("message");
shouldBe('enumerableProperties(error)', '["stack"]');
shouldBe('enumerableProperties(error)', '[]');
shouldBe('enumerableProperties(nativeError)', '["stack", "line", "sourceURL"]');
shouldBe('Object.getPrototypeOf(nativeError).name', '"RangeError"');
......
2013-08-22 Gavin Barraclough <barraclough@apple.com>
Error.stack should not be enumerable
https://bugs.webkit.org/show_bug.cgi?id=120171
Reviewed by Oliver Hunt.
Breaks ECMA tests.
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::finishCreation):
- None -> DontEnum
2013-08-21 Gavin Barraclough <barraclough@apple.com>
 
https://bugs.webkit.org/show_bug.cgi?id=120128
......
......@@ -44,7 +44,7 @@ void ErrorInstance::finishCreation(VM& vm, const String& message, Vector<StackFr
putDirect(vm, vm.propertyNames->message, jsString(&vm, message), DontEnum);
if (!stackTrace.isEmpty())
putDirect(vm, vm.propertyNames->stack, vm.interpreter->stackTraceAsString(vm.topCallFrame, stackTrace), None);
putDirect(vm, vm.propertyNames->stack, vm.interpreter->stackTraceAsString(vm.topCallFrame, stackTrace), DontEnum);
}
} // namespace JSC
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment