Title: [141315] trunk/Source/WebCore
Revision
141315
Author
[email protected]
Date
2013-01-30 14:36:24 -0800 (Wed, 30 Jan 2013)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (141314 => 141315)


--- trunk/Source/WebCore/ChangeLog	2013-01-30 22:32:30 UTC (rev 141314)
+++ trunk/Source/WebCore/ChangeLog	2013-01-30 22:36:24 UTC (rev 141315)
@@ -1,3 +1,23 @@
+2013-01-30  Kentaro Hara  <[email protected]>
+
+        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  <[email protected]>
 
         Remove unnecessary setAnimating() method

Modified: trunk/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp (141314 => 141315)


--- trunk/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp	2013-01-30 22:32:30 UTC (rev 141314)
+++ trunk/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp	2013-01-30 22:36:24 UTC (rev 141315)
@@ -66,7 +66,7 @@
     // 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) {

Modified: trunk/Source/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp (141314 => 141315)


--- trunk/Source/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp	2013-01-30 22:32:30 UTC (rev 141314)
+++ trunk/Source/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp	2013-01-30 22:36:24 UTC (rev 141315)
@@ -67,7 +67,7 @@
     // 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>();

Modified: trunk/Source/WebCore/page/History.cpp (141314 => 141315)


--- trunk/Source/WebCore/page/History.cpp	2013-01-30 22:32:30 UTC (rev 141314)
+++ trunk/Source/WebCore/page/History.cpp	2013-01-30 22:36:24 UTC (rev 141315)
@@ -77,9 +77,9 @@
     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()

Modified: trunk/Source/WebCore/page/History.h (141314 => 141315)


--- trunk/Source/WebCore/page/History.h	2013-01-30 22:32:30 UTC (rev 141314)
+++ trunk/Source/WebCore/page/History.h	2013-01-30 22:36:24 UTC (rev 141315)
@@ -55,7 +55,7 @@
     void go(ScriptExecutionContext*, int distance);
 
     bool stateChanged() const;
-    bool isSameAsCurrentState(PassRefPtr<SerializedScriptValue>) const;
+    bool isSameAsCurrentState(SerializedScriptValue*) const;
 
     enum StateObjectType {
         StateObjectPush,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to