mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 605264: Stop content script from mucking around with nsHTMLMediaElement::Observe. r=jst a=b
This commit is contained in:
parent
5cacf25656
commit
029b5aaed4
8
content/html/content/crashtests/605264.html
Normal file
8
content/html/content/crashtests/605264.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
|
||||
var v = document.createElementNS("http://www.w3.org/1999/xhtml", "video");
|
||||
v.QueryInterface(Components.interfaces.nsIObserver);
|
||||
v.observe(null, null, null);
|
||||
|
||||
</script>
|
@ -21,6 +21,7 @@ load 590387.html
|
||||
load 596785-1.html
|
||||
load 596785-2.html
|
||||
load 604807.html
|
||||
load 605264.html
|
||||
load 606430-1.html
|
||||
load 602117.html
|
||||
load 613027.html
|
||||
|
@ -2397,6 +2397,8 @@ void nsHTMLMediaElement::DoRemoveSelfReference()
|
||||
nsresult nsHTMLMediaElement::Observe(nsISupports* aSubject,
|
||||
const char* aTopic, const PRUnichar* aData)
|
||||
{
|
||||
NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_NOT_AVAILABLE);
|
||||
|
||||
if (strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID) == 0) {
|
||||
mShuttingDown = PR_TRUE;
|
||||
AddRemoveSelfReference();
|
||||
|
Loading…
Reference in New Issue
Block a user