The default bug view has changed. See this FAQ.

nsIScriptContext::ExecuteScript's first parameter should be a JSScript

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

(6 attachments)

(Assignee)

Description

6 years ago
As requested in bug 694781 comment 1.
Flags: in-testsuite-
(Assignee)

Comment 1

6 years ago
Created attachment 567349 [details] [diff] [review]
Part a: Pass a JSScript to nsIScriptContext::Serialize and store a JSScript in nsXULPrototypeScript::ScriptObjectHolder::mObject
Attachment #567349 - Flags: review?(mounir)
(Assignee)

Comment 2

6 years ago
Created attachment 567351 [details] [diff] [review]
Part b: Pass a JSScript to nsXULPrototypeScript::Set
Attachment #567351 - Flags: review?(mounir)
(Assignee)

Comment 3

6 years ago
Created attachment 567352 [details] [diff] [review]
Part c: Return a JSScript from nsXULPrototypeCache::GetScript
Attachment #567352 - Flags: review?(mounir)
(Assignee)

Comment 4

6 years ago
Created attachment 567353 [details] [diff] [review]
Part d: Store a JSScript in nsXULPrototypeCache

Note that I don't have to change the consumers because they pass the mObject member of ScriptObjectHolder, which I changed in part a.
Attachment #567353 - Flags: review?(mounir)
(Assignee)

Comment 5

6 years ago
Created attachment 567354 [details] [diff] [review]
Part e: Pass JSScript to nsXULDocument::ExecuteScript

Same comment as for part d.
Attachment #567354 - Flags: review?(mounir)
(Assignee)

Comment 6

6 years ago
Created attachment 567355 [details] [diff] [review]
Part f: Pass a JSScript to nsIScriptContext::ExecuteScript

Note that nsXULDocument::ExecuteScript is its only caller.
Attachment #567355 - Flags: review?(mounir)
Attachment #567349 - Flags: review?(mounir) → review+
Attachment #567351 - Flags: review?(mounir) → review+
Attachment #567352 - Flags: review?(mounir) → review+
Attachment #567353 - Flags: review?(mounir) → review+
Attachment #567354 - Flags: review?(mounir) → review+
Attachment #567355 - Flags: review?(mounir) → review+
Everything seems fine but it would have been easier to read in one file given that most patches are basically adding some static_cast which are removed by other patches.
(Assignee)

Updated

6 years ago
Blocks: 695753
(Assignee)

Comment 8

6 years ago
Comment on attachment 567351 [details] [diff] [review]
Part b: Pass a JSScript to nsXULPrototypeScript::Set

>--- a/dom/base/nsDOMScriptObjectHolder.h
>+++ b/dom/base/nsDOMScriptObjectHolder.h

>+  JSScript* getObject() const {

Looking back at the patch, mind if I make it getScript?
(In reply to Ms2ger from comment #8)
> Looking back at the patch, mind if I make it getScript?

Makes more sense indeed.
(Assignee)

Comment 10

6 years ago
https://hg.mozilla.org/mozilla-central/rev/9f14aa19f2e9
https://hg.mozilla.org/mozilla-central/rev/70746df95663
https://hg.mozilla.org/mozilla-central/rev/15904b0261b3
https://hg.mozilla.org/mozilla-central/rev/3b30dade99c9
https://hg.mozilla.org/mozilla-central/rev/00b15d7cf608
https://hg.mozilla.org/mozilla-central/rev/0573e102ae3d
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.