Commit d835eaee authored by haraken@chromium.org's avatar haraken@chromium.org

isSameAsCurrentState() should take SerializedScriptValue* instead of PassRefPtr

https://bugs.webkit.org/show_bug.cgi?id=107904

Reviewed by Darin Adler.

Applied Darin's comment: https://bugs.webkit.org/show_bug.cgi?id=107904#c5

No tests. No change in behavior.

* bindings/js/JSPopStateEventCustom.cpp:
(WebCore::JSPopStateEvent::state):
* bindings/v8/custom/V8PopStateEventCustom.cpp:
(WebCore::V8PopStateEvent::stateAccessorGetter):
* page/History.cpp:
(WebCore::History::isSameAsCurrentState):
* page/History.h:
(History):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7e9e907f
2013-01-30 Kentaro Hara <haraken@chromium.org>
isSameAsCurrentState() should take SerializedScriptValue* instead of PassRefPtr
https://bugs.webkit.org/show_bug.cgi?id=107904
Reviewed by Darin Adler.
Applied Darin's comment: https://bugs.webkit.org/show_bug.cgi?id=107904#c5
No tests. No change in behavior.
* bindings/js/JSPopStateEventCustom.cpp:
(WebCore::JSPopStateEvent::state):
* bindings/v8/custom/V8PopStateEventCustom.cpp:
(WebCore::V8PopStateEvent::stateAccessorGetter):
* page/History.cpp:
(WebCore::History::isSameAsCurrentState):
* page/History.h:
(History):
2013-01-30 Douglas Stockwell <dstockwell@chromium.org>
Remove unnecessary setAnimating() method
......@@ -66,7 +66,7 @@ JSValue JSPopStateEvent::state(ExecState* exec) const
// The current history state object might've changed in the meantime, so we need to take care
// of using the correct one, and always share the same deserialization with history.state.
bool isSameState = history->isSameAsCurrentState(event->serializedState());
bool isSameState = history->isSameAsCurrentState(event->serializedState().get());
JSValue result;
if (isSameState) {
......
......@@ -67,7 +67,7 @@ v8::Handle<v8::Value> V8PopStateEvent::stateAccessorGetter(v8::Local<v8::String>
// The current history state object might've changed in the meantime, so we need to take care
// of using the correct one, and always share the same deserialization with history.state.
bool isSameState = history->isSameAsCurrentState(event->serializedState());
bool isSameState = history->isSameAsCurrentState(event->serializedState().get());
if (isSameState) {
v8::Handle<v8::Object> v8History = toV8(history, info.Holder(), info.GetIsolate()).As<v8::Object>();
......
......@@ -77,9 +77,9 @@ bool History::stateChanged() const
return m_lastStateObjectRequested != stateInternal();
}
bool History::isSameAsCurrentState(PassRefPtr<SerializedScriptValue> state) const
bool History::isSameAsCurrentState(SerializedScriptValue* state) const
{
return state == stateInternal();
return state == stateInternal().get();
}
void History::back()
......
......@@ -55,7 +55,7 @@ public:
void go(ScriptExecutionContext*, int distance);
bool stateChanged() const;
bool isSameAsCurrentState(PassRefPtr<SerializedScriptValue>) const;
bool isSameAsCurrentState(SerializedScriptValue*) const;
enum StateObjectType {
StateObjectPush,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment