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>
Created attachment 70459 [details] Adds the private API for creating a WebKit2 WebSerializedScriptValue from the internal representation of a WebKit1 WebSerializedJSValue
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.
(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
(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 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