Bug 102854

Summary: [V8] Unify the Node and non-Node code paths for getting JavaScript wrappers
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED INVALID    
Severity: Normal CC: andersca, dglazkov, eric.carlson, eric, feature-media-reviews, haraken, japhet, levin+threading, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Leaks objects in workers none

Description Adam Barth 2012-11-20 18:24:18 PST
[V8] Unify the Node and non-Node code paths for getting JavaScript wrappers
Comment 1 Adam Barth 2012-11-20 18:30:30 PST
Created attachment 175319 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-11-20 18:46:50 PST
Comment on attachment 175319 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=175319&action=review

> Source/WebCore/ChangeLog:10
> +        should not be as fast to access as Nodes were previously.

should now?

> Source/WebCore/ChangeLog:26
> +              DOM object has a wrapper both on the main thread and on a worker
> +              thread, we'll have a write conflict as both threads will want to
> +              store the wrapper inline in the object.

We have an ASSERT to catch that, no?
Comment 3 WebKit Review Bot 2012-11-20 20:18:45 PST
Comment on attachment 175319 [details]
Patch

Attachment 175319 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14913826

New failing tests:
fast/workers/worker-close-more.html
fast/workers/dedicated-worker-lifecycle.html
fast/workers/worker-lifecycle.html
Comment 4 Adam Barth 2012-11-21 16:13:04 PST
Created attachment 175543 [details]
Leaks objects in workers
Comment 5 Adam Barth 2012-11-21 16:20:08 PST
The part I got hung up on here was trying to make ScriptWrappable work in workers.  On worker shutdown, we need to clear out the JavaScript wrappers and deref the underlying objects.  If we use ScriptWrappable, we no longer have the hashmap to enumerate.  I tried enumerating the handles from the V8 global handle table, but that fails if the worker is terminated via terminate() because the handle table is already destroyed by the time we get around to clearing out the wrappers.
Comment 6 Anders Carlsson 2013-09-01 10:34:32 PDT
V8 is gone.