Bug 102854 - [V8] Unify the Node and non-Node code paths for getting JavaScript wrappers
Summary: [V8] Unify the Node and non-Node code paths for getting JavaScript wrappers
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-20 18:24 PST by Adam Barth
Modified: 2013-09-01 10:34 PDT (History)
9 users (show)

See Also:


Attachments
Patch (59.77 KB, patch)
2012-11-20 18:30 PST, Adam Barth
no flags Details | Formatted Diff | Diff
Leaks objects in workers (11.12 KB, patch)
2012-11-21 16:13 PST, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.