Bug 37263 - [v8] SerializedScriptValue fails to deserialize an Object that has prototype with properties
: [v8] SerializedScriptValue fails to deserialize an Object that has prototype ...
Status: RESOLVED FIXED
: WebKit
WebCore JavaScript
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2010-04-08 05:11 PST by
Modified: 2010-04-08 08:10 PST (History)


Attachments
proposed fix (1.21 KB, patch)
2010-04-08 05:15 PST, Yury Semikhatsky
no flags Review Patch | Details | Formatted Diff | Diff
patch (4.31 KB, patch)
2010-04-08 06:37 PST, Yury Semikhatsky
pfeldman: review+
Review Patch | Details | Formatted Diff | Diff
patch (4.23 KB, patch)
2010-04-08 06:44 PST, Yury Semikhatsky
pfeldman: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-04-08 05:11:42 PST
SerializedScriptValue fails to deserialize an Object that has prototype with properties. Try to serialize and the deserialize object with the following constructor:

InjectedScript.CallFrameProxy = function(id)
{
    this.id = id;
}

InjectedScript.CallFrameProxy.prototype = {
    _wrapScopeChain: function(callFrame)
    {}
}
------- Comment #1 From 2010-04-08 05:15:31 PST -------
Created an attachment (id=52853) [details]
proposed fix
------- Comment #2 From 2010-04-08 06:37:59 PST -------
Created an attachment (id=52857) [details]
patch
------- Comment #3 From 2010-04-08 06:44:45 PST -------
Created an attachment (id=52859) [details]
patch

Moved    ++m_numSerializedProperties; after property names serialization according to vitalyr feedback.
------- Comment #4 From 2010-04-08 07:28:49 PST -------
Committing to http://svn.webkit.org/repository/webkit/trunk ...
    M    LayoutTests/ChangeLog
    M    LayoutTests/fast/dom/Window/window-postmessage-clone-expected.txt
    M    LayoutTests/fast/dom/Window/window-postmessage-clone.html
    M    WebCore/ChangeLog
    M    WebCore/bindings/v8/SerializedScriptValue.cpp
Committed r57276
------- Comment #5 From 2010-04-08 08:10:45 PST -------
(In reply to comment #4)
> Committing to http://svn.webkit.org/repository/webkit/trunk ...
>     M    LayoutTests/ChangeLog
>     M    LayoutTests/fast/dom/Window/window-postmessage-clone-expected.txt
>     M    LayoutTests/fast/dom/Window/window-postmessage-clone.html
>     M    WebCore/ChangeLog
>     M    WebCore/bindings/v8/SerializedScriptValue.cpp
> Committed r57276

Thanks a lot for fixing this!