Bug 3601 - Error instance type info
Summary: Error instance type info
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 412
Hardware: PC Linux
: P2 Normal
Assignee: Maciej Stachowiak
URL: http://websvn.kde.org/trunk/kdelibs/k...
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-18 04:02 PDT by Harri Porten
Modified: 2005-07-15 10:13 PDT (History)
0 users

See Also:


Attachments
Patch (3.86 KB, patch)
2005-07-14 15:26 PDT, Geoffrey Garen
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harri Porten 2005-06-18 04:02:10 PDT
error_object.* lacks some fixes applied to the KDE versions. This is one:

-const ClassInfo NativeErrorImp::info = {"Error", &InternalFunctionImp::info, 0, 0};
+const ClassInfo NativeErrorImp::info = {"Function", &InternalFunctionImp::info,
0, 0};

The other would be to introduce the ErrorInstanceImp class to be found in KDE's
.h and .cpp file.

The relevant test cases from khtmltests/regression/tests/js/Error.js:

shouldBe("Object.prototype.toString.apply(Error())", "'[object Error]'");
shouldBe("Object.prototype.toString.apply(Error)", "'[object Function]'");
shouldBe("Object.prototype.toString.apply(EvalError)", "'[object Function]'");
Comment 1 Geoffrey Garen 2005-07-14 15:26:47 PDT
Created attachment 2969 [details]
Patch

Fix.
Comment 2 Geoffrey Garen 2005-07-14 15:27:58 PDT
Causes the following test failures:
        ecma_3/Function/regress-104584.js
        ecma_3/Object/class-001.js
        ecma_3/Object/class-003.js
        ecma_3/Object/class-004.js
        ecma_3/Object/regress-72773.js
Comment 3 Maciej Stachowiak 2005-07-14 16:47:23 PDT
Comment on attachment 2969 [details]
Patch

r=me
Comment 4 Geoffrey Garen 2005-07-15 10:06:27 PDT
(Actually, failure in ecma_3/Function/regress-104584.js is caused by bug #4006.)