Bug 47439 - Add Private API for creating a WebKit2 WebSerializedScriptValue from the internal representation of a WebKit1 WebSerializedJSValue
Summary: Add Private API for creating a WebKit2 WebSerializedScriptValue from the inte...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jessie Berlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-08 16:33 PDT by Jessie Berlin
Modified: 2010-10-11 14:21 PDT (History)
3 users (show)

See Also:


Attachments
Adds the private API for creating a WebKit2 WebSerializedScriptValue from the internal representation of a WebKit1 WebSerializedJSValue (6.44 KB, patch)
2010-10-11 11:46 PDT, Jessie Berlin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jessie Berlin 2010-10-08 16:33:46 PDT
This is the counterpart to https://bugs.webkit.org/show_bug.cgi?id=47390 (Add Private API for creating a WebKit1 WebSerializedJSValue from the internal representation of a WebKit2 WebSerializedScriptValue).

<rdar://problem/8525419>
Comment 1 Jessie Berlin 2010-10-11 11:46:39 PDT
Created attachment 70459 [details]
Adds the private API for creating a WebKit2 WebSerializedScriptValue from the internal representation of a WebKit1 WebSerializedJSValue
Comment 2 Darin Adler 2010-10-11 13:39:00 PDT
Comment on attachment 70459 [details]
Adds the private API for creating a WebKit2 WebSerializedScriptValue from the internal representation of a WebKit1 WebSerializedJSValue

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

> WebKit2/Shared/API/c/WKSerializedScriptValue.cpp:47
> +    RefPtr<WebSerializedScriptValue> serializedValue = WebSerializedScriptValue::create(reinterpret_cast<WebCore::SerializedScriptValue*>(internalRepresentation));

This can be a static_cast rather than a reinterpret_cast.
Comment 3 Jessie Berlin 2010-10-11 13:50:21 PDT
(In reply to comment #2)
> (From update of attachment 70459 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=70459&action=review
> 
> > WebKit2/Shared/API/c/WKSerializedScriptValue.cpp:47
> > +    RefPtr<WebSerializedScriptValue> serializedValue = WebSerializedScriptValue::create(reinterpret_cast<WebCore::SerializedScriptValue*>(internalRepresentation));
> 
> This can be a static_cast rather than a reinterpret_cast.

Done.

Thanks for the review!

Jessie
Comment 4 Jessie Berlin 2010-10-11 13:58:01 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 70459 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=70459&action=review
> > 
> > > WebKit2/Shared/API/c/WKSerializedScriptValue.cpp:47
> > > +    RefPtr<WebSerializedScriptValue> serializedValue = WebSerializedScriptValue::create(reinterpret_cast<WebCore::SerializedScriptValue*>(internalRepresentation));
> > 
> > This can be a static_cast rather than a reinterpret_cast.
> 
> Done.
> 
> Thanks for the review!
> 
> Jessie

I also changed the signature on the window side to be 

[local] HRESULT getInternalRepresentation([out, retval] void** internalRepresentation);

so that it would actually return the value.
Comment 5 Jessie Berlin 2010-10-11 14:21:37 PDT
Comment on attachment 70459 [details]
Adds the private API for creating a WebKit2 WebSerializedScriptValue from the internal representation of a WebKit1 WebSerializedJSValue

Committed in r69524
http://trac.webkit.org/changeset/69524