Closed Bug 745211 Opened 8 years ago Closed 8 years ago

Remove SetScriptContext from nsIScriptGlobalObject

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch v1 (obsolete) — Splinter Review
Apart from the one call in nsXBLDocumentInfo::~nsXBLDocumentInfo(), SetScriptContext is only called from EnsureScriptEnvironment(), so it is rather silly to put it on nsIScriptGlobalObject. Also, inlining the implementations allows to simplify them, as we know the argument isn't null.
Attachment #614801 - Flags: review?(mrbkap)
Attached patch Patch v1.1Splinter Review
And now a patch that compiles...
Attachment #614801 - Attachment is obsolete: true
Attachment #614801 - Flags: review?(mrbkap)
Attachment #614820 - Flags: review?(mrbkap)
Comment on attachment 614820 [details] [diff] [review]
Patch v1.1

Review of attachment 614820 [details] [diff] [review]:
-----------------------------------------------------------------

One substantive comment. r=me with it addressed.

::: dom/base/nsIScriptGlobalObject.h
@@ -138,5 @@
> -   * Set a new language context for this global.  The native global for the
> -   * context is created by the context's GetNativeGlobal() method.
> -   */
> -
> -  virtual nsresult SetScriptContext(nsIScriptContext *aContext) = 0;

You need to bump the IID for nsIScriptGlobalObject.
Attachment #614820 - Flags: review?(mrbkap) → review+
https://hg.mozilla.org/mozilla-central/rev/fb420fe0c2a4
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.