зеркало из https://github.com/mozilla/gecko-dev.git
Bug 791845 - mozMatchesSelectorStub should return false on error. r=bholley
This commit is contained in:
Родитель
6f9d988c50
Коммит
f7c3bb7006
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
var ms = Components.lookupMethod(document.documentElement, "mozMatchesSelector");
|
||||
ms.apply({});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="boom();"></body>
|
||||
</html>
|
|
@ -45,3 +45,4 @@ asserts(1) load 753162.html # We hit bug 675518 or bug 680086 here.
|
|||
load 754311.html
|
||||
load 776328.html
|
||||
load 776333.html
|
||||
load 791845.html
|
||||
|
|
|
@ -653,9 +653,11 @@ Is(JSObject *wrapper)
|
|||
static JSBool
|
||||
mozMatchesSelectorStub(JSContext *cx, unsigned argc, jsval *vp)
|
||||
{
|
||||
if (argc < 1)
|
||||
if (argc < 1) {
|
||||
JS_ReportError(cx, "Not enough arguments");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
JSObject *wrapper = JS_THIS_OBJECT(cx, vp);
|
||||
JSString *selector = JS_ValueToString(cx, JS_ARGV(cx, vp)[0]);
|
||||
nsDependentJSString selectorStr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче