Cleanup the window scriptable helper some

RESOLVED FIXED

Status

()

Core
DOM
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: mrbkap, Assigned: mrbkap)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(3 attachments)

(Assignee)

Description

8 years ago
Now that the inner and outer windows don't share a scriptable helper, we can move some work out of the inner window.
(Assignee)

Comment 1

8 years ago
Created attachment 463715 [details] [diff] [review]
NewEnumerate can move the outer
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #463715 - Flags: review?(jst)
(Assignee)

Comment 2

8 years ago
Created attachment 463716 [details] [diff] [review]
innerObject and outerObject should be on the outer SH and inner SH respectively

After this patch, we can actually make some code that calls the innerObject hook just check for its presence, which might save some perf in eval.
Attachment #463716 - Flags: review?(jst)
(Assignee)

Comment 3

8 years ago
Created attachment 463718 [details] [diff] [review]
newResolve and addProperty
Attachment #463718 - Flags: review?(jst)

Updated

8 years ago
Attachment #463715 - Flags: review?(jst) → review+
Comment on attachment 463716 [details] [diff] [review]
innerObject and outerObject should be on the outer SH and inner SH respectively

- In nsOuterWindowSH::InnerObject():

     nsGlobalWindow *inner = win->GetCurrentInnerWindowInternal();
     if (!inner) {
       // Yikes! No inner window! Instead of leaking the outer window into the
       // scope chain, let's return an error.
+      // XXX Can this still happen?

Maybe assert that it is so?

r=jst
Attachment #463716 - Flags: review?(jst) → review+

Updated

8 years ago
Attachment #463718 - Flags: review?(jst) → review+

Comment 6

8 years ago
http://hg.mozilla.org/mozilla-central/rev/36c4d4e837bb
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.