WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
Bug 27662
Document needs a JSDOMWindow pointer that doesn't require going through Frame
https://bugs.webkit.org/show_bug.cgi?id=27662
Summary
Document needs a JSDOMWindow pointer that doesn't require going through Frame
Eric Seidel (no email)
Reported
2009-07-24 12:14:55 PDT
Document needs a JSDOMWindow pointer that doesn't require going through Frame This is needed for times in the bindings where we have a Node* or a Document* and we need to get the globalObject so that we can correctly call toJS(). NodeFilterConditionCustom.cpp acceptNode() is one such example. Relating this to
bug 27640
which is the inverse of this mapping.
Attachments
Add attachment
proposed patch, testcase, etc.
Loic Dachary
Comment 1
2011-10-05 07:10:53 PDT
Hi, I think this bug is related to
bug 26147
. I'm trying to fix it and I would appreciate if you have an advice on how to proceed. Do you think it should be an additional field to the Document class ? If so do you think it should be set when the Document constructor is called or attached to it later on ? There are many approach to this problem and any kind of guidance would be most appreciated. Cheers
Adam Barth
Comment 2
2011-10-05 10:38:52 PDT
We solved this problem a different way.
Loic Dachary
Comment 3
2011-10-05 15:10:25 PDT
(In reply to
comment #2
)
> We solved this problem a different way.
The chosen solution is incorrect.
Eric Seidel (no email)
Comment 4
2011-10-05 15:13:51 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > We solved this problem a different way. > > The chosen solution is incorrect.
Could you provide a bit more context as to what the solution was and why you believe it's incorrect? (Although I filed this bug, I haven't worked in this area in a long time.)
Adam Barth
Comment 5
2011-10-05 15:15:26 PDT
The reason this bug is invalid is because Document is a DOM-layer object and JSDOMWindow is a bindings-layer object. It's generally not a good idea to have a DOM-layer object have a pointer to a bindings-layer object. Instead, we ended up storing the pointer in the JSDocument wrapper object, which is a bindings-layer object.
Loic Dachary
Comment 6
2011-10-06 01:22:15 PDT
Thanks for explaining, now I understand. I'm still unsure if this will help in the context of
bug 26147
, but it's a different topic.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug