mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
fix for 19133. r=waterson, a=brendan.
This commit is contained in:
parent
91c22f9f57
commit
b854d078d4
@ -1681,7 +1681,8 @@ nsXULElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
|
||||
mDocument->GetScriptGlobalObject(getter_AddRefs(global));
|
||||
if (global) {
|
||||
nsCOMPtr<nsIScriptContext> context;
|
||||
if (NS_OK == global->GetContext(getter_AddRefs(context))) {
|
||||
global->GetContext(getter_AddRefs(context));
|
||||
if (context) {
|
||||
context->RemoveReference((void*) &mScriptObject, mScriptObject);
|
||||
}
|
||||
}
|
||||
@ -1697,7 +1698,8 @@ nsXULElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
|
||||
mDocument->GetScriptGlobalObject(getter_AddRefs(global));
|
||||
if (global) {
|
||||
nsCOMPtr<nsIScriptContext> context;
|
||||
if (NS_OK == global->GetContext(getter_AddRefs(context))) {
|
||||
global->GetContext(getter_AddRefs(context));
|
||||
if (context) {
|
||||
context->AddNamedReference((void*) &mScriptObject, mScriptObject, "nsXULElement::mScriptObject");
|
||||
}
|
||||
}
|
||||
|
@ -1681,7 +1681,8 @@ nsXULElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
|
||||
mDocument->GetScriptGlobalObject(getter_AddRefs(global));
|
||||
if (global) {
|
||||
nsCOMPtr<nsIScriptContext> context;
|
||||
if (NS_OK == global->GetContext(getter_AddRefs(context))) {
|
||||
global->GetContext(getter_AddRefs(context));
|
||||
if (context) {
|
||||
context->RemoveReference((void*) &mScriptObject, mScriptObject);
|
||||
}
|
||||
}
|
||||
@ -1697,7 +1698,8 @@ nsXULElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
|
||||
mDocument->GetScriptGlobalObject(getter_AddRefs(global));
|
||||
if (global) {
|
||||
nsCOMPtr<nsIScriptContext> context;
|
||||
if (NS_OK == global->GetContext(getter_AddRefs(context))) {
|
||||
global->GetContext(getter_AddRefs(context));
|
||||
if (context) {
|
||||
context->AddNamedReference((void*) &mScriptObject, mScriptObject, "nsXULElement::mScriptObject");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user