Bug 103662 - [V8] DOM callbacks shouldn't reimplement ScopedPersistent they should use it
Summary: [V8] DOM callbacks shouldn't reimplement ScopedPersistent they should use it
Status: RESOLVED FIXED
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-29 12:43 PST by Adam Barth
Modified: 2012-11-29 15:00 PST (History)
5 users (show)

See Also:


Attachments
Patch (10.76 KB, patch)
2012-11-29 12:45 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-29 12:43:53 PST
[V8] DOM callbacks shouldn't reimplement ScopedPersistent they should use it
Comment 1 Adam Barth 2012-11-29 12:45:19 PST
Created attachment 176792 [details]
Patch
Comment 2 Adam Klein 2012-11-29 12:51:49 PST
Comment on attachment 176792 [details]
Patch

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

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:3360
> +    m_callback.get().MakeWeak(this, &${v8InterfaceName}::weakCallback);

Nit, you can use operator-> here
Comment 3 Adam Barth 2012-11-29 13:38:21 PST
(In reply to comment #2)
> (From update of attachment 176792 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=176792&action=review
> 
> > Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:3360
> > +    m_callback.get().MakeWeak(this, &${v8InterfaceName}::weakCallback);
> 
> Nit, you can use operator-> here

I need to call a function on the Handle itself, not the underlying object.  I'm pretty sure I made -> give you back the underlying object.
Comment 4 Adam Barth 2012-11-29 13:43:55 PST
In file included from gen/webkit/bindings/V8DerivedSources02.cpp:45:
gen/webcore/bindings/V8NavigatorUserMediaErrorCallback.cpp:46:17: error: no member named 'MakeWeak' in 'v8::Object'
    m_callback->MakeWeak(this, &V8NavigatorUserMediaErrorCallback::weakCallback);
    ~~~~~~~~~~  ^
In file included from gen/webkit/bindings/V8DerivedSources02.cpp:49:
Comment 5 Eric Seidel (no email) 2012-11-29 13:45:53 PST
Comment on attachment 176792 [details]
Patch

LGTM.
Comment 6 WebKit Review Bot 2012-11-29 15:00:03 PST
Comment on attachment 176792 [details]
Patch

Clearing flags on attachment: 176792

Committed r136168: <http://trac.webkit.org/changeset/136168>
Comment 7 WebKit Review Bot 2012-11-29 15:00:07 PST
All reviewed patches have been landed.  Closing bug.