Bug 560351 - Don't forget to actually throw the exception. r=peterv

--HG--
extra : rebase_source : 92f95ae32314cd74975dc2a932f67e617b4a7772
This commit is contained in:
Blake Kaplan 2010-05-05 20:44:30 -07:00
parent 145742632c
commit ceef5df2e4
3 changed files with 39 additions and 1 deletions

View File

@ -55,7 +55,7 @@ xpc_qsUnwrapThis<_interface>(JSContext *cx, \
pThisRef, pThisVal, lccx, \
&rv); \
if(!native) \
return JS_FALSE; \
return xpc_qsThrow(cx, rv); \
*ppThis = static_cast<_interface*>(native); \
return JS_TRUE; \
} \

View File

@ -71,6 +71,7 @@ _TEST_FILES = bug500931_helper.html \
test_bug505915.html \
test_bug517163.html \
test_bug553407.html \
test_bug560351.html \
test_cows.html \
test_frameWrapping.html \
$(NULL)

View File

@ -0,0 +1,37 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=560351
-->
<head>
<title>Test for Bug 560351</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=560351">Mozilla Bug 560351</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 560351 **/
var pass = false;
try {
document.body.__lookupGetter__("lastChild")();
} catch (e) {
pass = true;
}
</script>
<script>
ok(pass, "pass was set to true");
</script>
</pre>
</body>
</html>