Closed Bug 880379 Opened 7 years ago Closed 7 years ago

simplify some use of nsIScriptGlobalObjectOwner

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: tbsaunde, Assigned: tbsaunde)

Details

Attachments

(2 files)

it seems like this interface is useless and we could just merge its functionality into other useful interfaces / objects, but for now I just wantto clean up the silliest stuff and see where we can get too.
Comment on attachment 759329 [details] [diff] [review]
bug 880329 - remove nsIXULDocument::GetScriptGlobalObjectOwner

update NS_IXULDOCUMENT_IID
Attachment #759329 - Flags: review?(bugs) → review+
Comment on attachment 759330 [details] [diff] [review]
bug 880329 - move nsIScriptGlobalObjectOwner out of nsXULPrototypeScript::Compile()


>-    nsresult rv;
>+    NS_ASSERTION(aGlobal, "prototype doc has no script global");
>+    if (!aGlobal)
>+        return NS_ERROR_UNEXPECTED;
{} with if, please


>+    nsIScriptContext *context = aGlobal->GetScriptContext();
>+    NS_ASSERTION(context, "no context for script global");
>+    if (! context)
>+      return NS_ERROR_UNEXPECTED;
if (!context) {
    return NS_ERROR_UNEXPECTED;
}
Attachment #759330 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/4c18bf4337fa
https://hg.mozilla.org/mozilla-central/rev/ca761338dcde
Assignee: nobody → trev.saunders
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.