Bug 27533 - [V8] Fix isolated world wrappers for event handlers
Summary: [V8] Fix isolated world wrappers for event handlers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 27698 27703
  Show dependency treegraph
 
Reported: 2009-07-22 01:14 PDT by Adam Barth
Modified: 2009-07-29 01:11 PDT (History)
3 users (show)

See Also:


Attachments
patch (11.04 KB, patch)
2009-07-22 01:26 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Slightly better patch (11.13 KB, patch)
2009-07-22 11:08 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
patch with less trailing whitespace (10.69 KB, patch)
2009-07-22 11:10 PDT, Adam Barth
dglazkov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2009-07-22 01:14:38 PDT
Currently the event handlers are using V8Proxy::context(m_frame), which leads to the wrong context for event listeners from isolated worlds.  Basically all clients of that function must die, but we're going to take it slow.  Patch forthcoming.
Comment 1 Adam Barth 2009-07-22 01:26:15 PDT
Created attachment 33248 [details]
patch
Comment 2 Adam Barth 2009-07-22 01:30:21 PDT
Comment on attachment 33248 [details]
patch

Actually, there might be some interaction with workers that I need to think though.  Clearing the review flag for now.
Comment 3 Adam Barth 2009-07-22 11:08:11 PDT
Created attachment 33271 [details]
Slightly better patch
Comment 4 Adam Barth 2009-07-22 11:10:43 PDT
Created attachment 33273 [details]
patch with less trailing whitespace
Comment 5 Dimitri Glazkov (Google) 2009-07-28 20:55:52 PDT
Comment on attachment 33273 [details]
patch with less trailing whitespace

ok. I wonder if OwnHandler would rather live in v8 namespace? It seems like a useful primitive and not very WebCore-specific.
Comment 6 Adam Barth 2009-07-29 00:32:14 PDT
(In reply to comment #5)
> ok. I wonder if OwnHandler would rather live in v8 namespace? It seems like a
> useful primitive and not very WebCore-specific.

I asked Ager about that, but he didn't seem too receptive.  He hadn't seen use for the concept.  We can demonstrate the use cases in the bindings and then ask again.
Comment 7 Adam Barth 2009-07-29 01:11:13 PDT
Sending        LayoutTests/ChangeLog
Adding         LayoutTests/http/tests/security/isolatedWorld/click-event-expected.txt
Adding         LayoutTests/http/tests/security/isolatedWorld/click-event.html
Sending        LayoutTests/platform/gtk/Skipped
Sending        LayoutTests/platform/mac/Skipped
Sending        LayoutTests/platform/qt/Skipped
Sending        LayoutTests/platform/win/Skipped
Sending        WebCore/ChangeLog
Sending        WebCore/WebCore.gypi
Adding         WebCore/bindings/v8/OwnHandle.h
Sending        WebCore/bindings/v8/V8AbstractEventListener.cpp
Sending        WebCore/bindings/v8/V8AbstractEventListener.h
Transmitting file data ............
Committed revision 46529.
http://trac.webkit.org/changeset/46529