The default bug view has changed. See this FAQ.

Remove nsIScriptContext::GetScriptGlobal in favour of GetGlobalJSObject

RESOLVED FIXED in mozilla10

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla10
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Created attachment 567285 [details] [diff] [review]
Patch v1
Attachment #567285 - Flags: review?(peterv)
Flags: in-testsuite-
(Assignee)

Updated

6 years ago
Blocks: 694781
(Assignee)

Updated

6 years ago
Blocks: 694838
(Assignee)

Comment 1

6 years ago
Created attachment 567334 [details] [diff] [review]
Patch v1.1

Missed a debug-only one.
Attachment #567285 - Attachment is obsolete: true
Attachment #567285 - Flags: review?(peterv)
Attachment #567334 - Flags: review?(peterv)
(Assignee)

Updated

6 years ago
Blocks: 695753

Comment 2

6 years ago
Comment on attachment 567334 [details] [diff] [review]
Patch v1.1

>+++ b/content/xul/document/src/nsXULDocument.cpp
>@@ -3625,24 +3625,18 @@ nsXULDocument::ExecuteScript(nsIScriptCo
> {
>     NS_PRECONDITION(aScriptObject != nsnull && aContext != nsnull, "null ptr");
>     if (! aScriptObject || ! aContext)
>         return NS_ERROR_NULL_POINTER;
> 
>     NS_ENSURE_TRUE(mScriptGlobalObject, NS_ERROR_NOT_INITIALIZED);
> 
>     // Execute the precompiled script with the given version
>-    nsresult rv;
>-    void *global = mScriptGlobalObject->GetScriptGlobal(
>-                                            aContext->GetScriptTypeID());
>-    rv = aContext->ExecuteScript(aScriptObject,
>-                                 global,
>-                                 nsnull, nsnull);
>-
>-    return rv;
>+    JSObject* global = mScriptGlobalObject->GetGlobalJSObject();
>+    return aContext->ExecuteScript(aScriptObject, global, nsnull, nsnull);

Could you add an assertion which checks that aContext->GetScriptTypeID() is JS
Attachment #567334 - Flags: review?(peterv) → review+
(Assignee)

Comment 3

6 years ago
https://hg.mozilla.org/mozilla-central/rev/3fb87667785f
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.