Bug 25385 - Upstream changes to V8 bindings for supporting nested workers.
Summary: Upstream changes to V8 bindings for supporting nested workers.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: David Levin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-24 16:16 PDT by Jian Li
Modified: 2022-01-23 23:55 PST (History)
1 user (show)

See Also:


Attachments
Proposed Patch (6.32 KB, patch)
2009-04-24 16:20 PDT, Jian Li
dglazkov: review-
Details | Formatted Diff | Diff
Proposed Patch (6.27 KB, patch)
2009-05-05 17:39 PDT, Jian Li
dglazkov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jian Li 2009-04-24 16:16:41 PDT
Upstream changes to V8 bindings for supporting nested workers.
Comment 1 Jian Li 2009-04-24 16:20:01 PDT
Created attachment 29777 [details]
Proposed Patch
Comment 2 Dimitri Glazkov (Google) 2009-05-05 15:56:02 PDT
Comment on attachment 29777 [details]
Proposed Patch

Style looks good! :)

> +        if (result.IsEmpty()) {
> +            v8::Local<v8::Object> object = toV8(type, type, impl);
> +            if (!object.IsEmpty())
> +                static_cast<Worker*>(impl)->ref();
> +            result = v8::Persistent<v8::Object>::New(object);
> +            V8Proxy::SetJSWrapperForDOMObject(impl, result);
> +        }
> +        return result;

Would it be a bit more clear to inverse this:

if (!result.IsEmpty())
   return result;
...

> +    return PassRefPtr<EventListener>();

Can just return 0;
Comment 3 Jian Li 2009-05-05 17:39:35 PDT
Created attachment 30042 [details]
Proposed Patch

All fixed. Thanks.
Comment 4 Dimitri Glazkov (Google) 2009-05-05 18:24:52 PDT
Comment on attachment 30042 [details]
Proposed Patch

Land it! :)
Comment 5 David Levin 2009-05-06 14:14:41 PDT
Assign to levin for landing.
Comment 6 David Levin 2009-05-06 15:03:36 PDT
http://trac.webkit.org/changeset/43328