зеркало из https://github.com/mozilla/pjs.git
Bug 682637: Restore null-check that got lost in the event handler IDLification. r=bz
This commit is contained in:
Родитель
2037168322
Коммит
eb6771d0fd
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
var frame = document.getElementById("f");
|
||||
var frameWin = frame.contentWindow;
|
||||
frame.parentNode.removeChild(frame);
|
||||
frameWin.onmouseover = function(){};
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="boom();">
|
||||
<iframe id="f" src="data:text/html,1"></iframe>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -4,5 +4,6 @@ load 135345-1.html
|
|||
load 422009-1.xhtml
|
||||
load 457776-1.html
|
||||
load 496308-1.html
|
||||
load 682637-1.html
|
||||
load recursive-onload.html
|
||||
load recursive-DOMNodeInserted.html
|
||||
|
|
|
@ -943,7 +943,11 @@ nsEventListenerManager::SetJSEventListenerToJsval(nsIAtom *aEventName,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// We might not have a script context, e.g. if we're setting a listener
|
||||
// on a dead Window.
|
||||
nsIScriptContext *context = nsJSUtils::GetStaticScriptContext(cx, aScope);
|
||||
NS_ENSURE_TRUE(context, NS_ERROR_FAILURE);
|
||||
|
||||
JSObject *scope = ::JS_GetGlobalForObject(cx, aScope);
|
||||
// Untrusted events are always permitted for non-chrome script
|
||||
// handlers.
|
||||
|
|
Загрузка…
Ссылка в новой задаче