diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index 3a81dc7a2305f2e3c87210e30f138c88d654960f..e9720e7b37a4e2b7931999289047f9573b0f9105 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,3 +1,15 @@ +2007-03-18 Alexey Proskuryakov + + Reviewed by Geoff. + + http://bugs.webkit.org/show_bug.cgi?id=13105 + REGRESSION: an exception raised when calculating base value of a dot expression is not returned + + Test: fast/js/dot-node-base-exception.html + + * kjs/nodes.cpp: + (FunctionCallDotNode::evaluate): Added the necessary KJS_CHECKEXCEPTIONVALUE. + 2007-03-18 Steve Falkenburg Build fix. diff --git a/JavaScriptCore/kjs/nodes.cpp b/JavaScriptCore/kjs/nodes.cpp index 1d047b390de08c44c02601e2c791c2294c6c4ef5..d696b4d9c0c83a8fea9f0cb7f9431bae4a61f972 100644 --- a/JavaScriptCore/kjs/nodes.cpp +++ b/JavaScriptCore/kjs/nodes.cpp @@ -755,6 +755,7 @@ static const char *dotExprDoesNotAllowCallsString() JSValue *FunctionCallDotNode::evaluate(ExecState *exec) { JSValue *baseVal = base->evaluate(exec); + KJS_CHECKEXCEPTIONVALUE JSObject *baseObj = baseVal->toObject(exec); PropertySlot slot; diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 48306728a12c56aa6ef3c8b5a56a575050d738d7..74a573f75f3194e2dc2216aaa9acb07bebf75cfe 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,14 @@ +2007-03-18 Alexey Proskuryakov + + Reviewed by Geoff. + + http://bugs.webkit.org/show_bug.cgi?id=13105 + REGRESSION: an exception raised when calculating base value of a dot expression is not returned + + * fast/js/dot-node-base-exception-expected.txt: Added. + * fast/js/dot-node-base-exception.html: Added. + * fast/js/resources/dot-node-base-exception.js: Added. + 2007-03-17 Nikolas Zimmermann Reviewed by Sam Weinig. diff --git a/LayoutTests/fast/js/dot-node-base-exception-expected.txt b/LayoutTests/fast/js/dot-node-base-exception-expected.txt new file mode 100644 index 0000000000000000000000000000000000000000..a0dd586ed3acb729b4521715baea423d8868d98c --- /dev/null +++ b/LayoutTests/fast/js/dot-node-base-exception-expected.txt @@ -0,0 +1,10 @@ +This test checks that a correct exception is raised when calculating the base value of a dot expression fails. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS (document.appendChild()).foobar() threw exception Error: NOT_FOUND_ERR: DOM Exception 8. +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/js/dot-node-base-exception.html b/LayoutTests/fast/js/dot-node-base-exception.html new file mode 100644 index 0000000000000000000000000000000000000000..d60bed23ff4c90c934ec9122577a19a35734f219 --- /dev/null +++ b/LayoutTests/fast/js/dot-node-base-exception.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/js/resources/dot-node-base-exception.js b/LayoutTests/fast/js/resources/dot-node-base-exception.js new file mode 100644 index 0000000000000000000000000000000000000000..cfefeb25b1dfd8f8ce74a86afd35203e7b6a45a4 --- /dev/null +++ b/LayoutTests/fast/js/resources/dot-node-base-exception.js @@ -0,0 +1,8 @@ +description( +"This test checks that a correct exception is raised when calculating the base value of a dot expression fails." +); + +// Should be a DOM exception, not just some "TypeError: Null value". +shouldThrow('(document.appendChild()).foobar()', '"Error: NOT_FOUND_ERR: DOM Exception 8"'); + +var successfullyParsed = true;