[Webkit-unassigned] [Bug 76035] Add state attribute to history's dom interface.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 17 18:52:27 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=76035
--- Comment #34 from Brady Eidson <beidson at apple.com> 2012-01-17 18:52:26 PST ---
(From update of attachment 122860)
View in context: https://bugs.webkit.org/attachment.cgi?id=122860&action=review
I'll look more in depth tomorrow, but a few surface comments before I head home for the night.
> Source/WebCore/history/HistoryItem.cpp:473
> + else {
> + ScriptValue deserializedStateObject = ScriptValue::deserialize(scriptState, m_stateObject.get());
> + m_deserializedStateObject = adoptPtr(new ScriptValue(deserializedStateObject));
> + }
Really a shame ScriptValue's can't be more easily deserialized to the heap. You *could* overload ScriptValue::deserialize to add a, OwnPtr<> version but I won't request that for this patch. An alternate here would be:
m_deserializedStateObject = adoptPtr(new ScriptValue(ScriptValue::deserialize(scriptState, m_stateObject.get())));
con: looks a bit uglier
pro: don't have to have faith that the compiler will optimize out the unnecessary temporary
> Source/WebCore/page/History.h:32
> +#include "ScriptState.h"
> +#include "ScriptValue.h"
Have to include ScriptValue.h, but can forward declare `class ScriptState`
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list