mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 819745. Correctly handle body.onerror = null. r=peterv
This commit is contained in:
parent
dcceb66959
commit
21c258072c
5
content/html/content/crashtests/819745.html
Normal file
5
content/html/content/crashtests/819745.html
Normal file
@ -0,0 +1,5 @@
|
||||
<!doctype="html">
|
||||
<body>
|
||||
<script>
|
||||
document.body.onerror = null;
|
||||
</script>
|
@ -43,3 +43,4 @@ load 795221-4.html
|
||||
load 795221-5.xml
|
||||
load 798802-1.html
|
||||
load 811226.html
|
||||
load 819745.html
|
||||
|
@ -1892,8 +1892,10 @@ nsGenericHTMLElement::SetOn##name_(EventHandlerNonNull* handler, \
|
||||
\
|
||||
nsCOMPtr<nsISupports> supports = do_QueryInterface(win); \
|
||||
nsGlobalWindow* globalWin = nsGlobalWindow::FromSupports(supports); \
|
||||
nsRefPtr<OnErrorEventHandlerNonNull> errorHandler = \
|
||||
new OnErrorEventHandlerNonNull(handler); \
|
||||
nsRefPtr<OnErrorEventHandlerNonNull> errorHandler; \
|
||||
if (handler) { \
|
||||
errorHandler = new OnErrorEventHandlerNonNull(handler); \
|
||||
} \
|
||||
return globalWin->SetOn##name_(errorHandler, error); \
|
||||
} \
|
||||
\
|
||||
|
Loading…
Reference in New Issue
Block a user