RESOLVED FIXED 25774
Need to upstream V8MessagePortCustom.cpp
https://bugs.webkit.org/show_bug.cgi?id=25774
Summary Need to upstream V8MessagePortCustom.cpp
Andrew Wilson
Reported 2009-05-13 17:50:31 PDT
The V8 implementation of MessagePorts needs to be upstreamed.
Attachments
patch with upstreamed file (7.52 KB, patch)
2009-05-13 17:56 PDT, Andrew Wilson
dglazkov: review+
Andrew Wilson
Comment 1 2009-05-13 17:56:32 PDT
Created attachment 30307 [details] patch with upstreamed file
Eric Seidel (no email)
Comment 2 2009-05-14 07:45:18 PDT
Comment on attachment 30307 [details] patch with upstreamed file It seems we could share some code between the onMessage and onClose handlers no? I think I would have used a static function to make those long if/else blocks not need to be copy/paste there. Please feel free to re-mark r=? if I'm missing something. Otherwise the code looks sane enough. createHiddenDependency and removeHiddenDependency seem confusing... what are they for? I assume also that this is already covered by existing layout tests? Otherwise this needs some form of testing.
Dimitri Glazkov (Google)
Comment 3 2009-05-14 08:53:23 PDT
Comment on attachment 30307 [details] patch with upstreamed file Eric is probably right about making this look better, but right now let's stay on the goal of moving all these upstream. Drew, can you file a WebKit bug to track (and act on) Eric's suggestion?
Andrew Wilson
Comment 4 2009-05-14 10:52:59 PDT
I've logged bug #25795 to track the needed refactoring. The required refactoring is actually very widespread - the code pattern Eric mentioned is shared across many different files in binding/v8/custom and we should refactor all of them. I believe that createHiddenDependency() and removeHiddenDependency() (from V8Utilities.h) are standard utility routines used by v8 to track the event listeners for GC purposes (make sure they don't get GC'd prematurely).
David Levin
Comment 5 2009-05-14 11:16:42 PDT
Assign to levin for landing.
David Levin
Comment 6 2009-05-14 12:59:36 PDT
Note You need to log in before you can comment on or make changes to this bug.