NativeError.prototype objects have [[Class]] of "Object" but should be "Error"
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 22:03:09 +0000 (22:03 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 22:03:09 +0000 (22:03 +0000)
commit6086c2b36a0b66b89afabe89e244c14156790722
treeb01aa43265ad8c37715d1847aecf25690f05c67b
parent812951c4a53a9de245e9a2e50f9ea869ccd48649
NativeError.prototype objects have [[Class]] of "Object" but should be "Error"
https://bugs.webkit.org/show_bug.cgi?id=55346

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
    - Switch to putDirect since we're not the only ones tranitioning this Structure now.
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NativeErrorPrototype.h:
    - Switch base class to ErrorPrototype.

LayoutTests:

Added test case.

* fast/js/native-error-prototype-expected.txt: Added.
* fast/js/native-error-prototype.html: Added.
* fast/js/script-tests/native-error-prototype.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/js/native-error-prototype-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/native-error-prototype.html [new file with mode: 0644]
LayoutTests/fast/js/script-tests/native-error-prototype.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ErrorPrototype.cpp
Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp
Source/JavaScriptCore/runtime/NativeErrorPrototype.h