Title: [96301] trunk/Source/WebCore
- Revision
- 96301
- Author
- [email protected]
- Date
- 2011-09-28 23:07:17 -0700 (Wed, 28 Sep 2011)
Log Message
"ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&"
https://bugs.webkit.org/show_bug.cgi?id=68984
Reviewed by Darin Adler.
Just a follow-up fix for the bug 68345. For performance,
"ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&".
Tests: fast/events/constructors/pop-state-event-constructor.html
fast/events/fire-popstate-event.html
* dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::PopStateEvent):
(WebCore::PopStateEvent::create):
(WebCore::PopStateEvent::initPopStateEvent):
* dom/PopStateEvent.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (96300 => 96301)
--- trunk/Source/WebCore/ChangeLog 2011-09-29 06:03:12 UTC (rev 96300)
+++ trunk/Source/WebCore/ChangeLog 2011-09-29 06:07:17 UTC (rev 96301)
@@ -1,3 +1,22 @@
+2011-09-28 Kentaro Hara <[email protected]>
+
+ "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&"
+ https://bugs.webkit.org/show_bug.cgi?id=68984
+
+ Reviewed by Darin Adler.
+
+ Just a follow-up fix for the bug 68345. For performance,
+ "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&".
+
+ Tests: fast/events/constructors/pop-state-event-constructor.html
+ fast/events/fire-popstate-event.html
+
+ * dom/PopStateEvent.cpp:
+ (WebCore::PopStateEvent::PopStateEvent):
+ (WebCore::PopStateEvent::create):
+ (WebCore::PopStateEvent::initPopStateEvent):
+ * dom/PopStateEvent.h:
+
2011-09-28 Martin Robinson <[email protected]>
[GTK] Move drag-and-drop code which can be shared with WebKit2 to WebCore
Modified: trunk/Source/WebCore/dom/PopStateEvent.cpp (96300 => 96301)
--- trunk/Source/WebCore/dom/PopStateEvent.cpp 2011-09-29 06:03:12 UTC (rev 96300)
+++ trunk/Source/WebCore/dom/PopStateEvent.cpp 2011-09-29 06:07:17 UTC (rev 96301)
@@ -48,7 +48,7 @@
{
}
-PopStateEvent::PopStateEvent(ScriptValue state)
+PopStateEvent::PopStateEvent(const ScriptValue& state)
: Event(eventNames().popstateEvent, false, true)
, m_state(state)
, m_serializedState(0)
@@ -70,7 +70,7 @@
return adoptRef(new PopStateEvent);
}
-PassRefPtr<PopStateEvent> PopStateEvent::create(ScriptValue state)
+PassRefPtr<PopStateEvent> PopStateEvent::create(const ScriptValue& state)
{
return adoptRef(new PopStateEvent(state));
}
@@ -85,7 +85,7 @@
return adoptRef(new PopStateEvent(type, initializer));
}
-void PopStateEvent::initPopStateEvent(const AtomicString& type, bool canBubble, bool cancelable, ScriptValue state)
+void PopStateEvent::initPopStateEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue& state)
{
if (dispatched())
return;
Modified: trunk/Source/WebCore/dom/PopStateEvent.h (96300 => 96301)
--- trunk/Source/WebCore/dom/PopStateEvent.h 2011-09-29 06:03:12 UTC (rev 96300)
+++ trunk/Source/WebCore/dom/PopStateEvent.h 2011-09-29 06:07:17 UTC (rev 96301)
@@ -43,10 +43,10 @@
public:
virtual ~PopStateEvent();
static PassRefPtr<PopStateEvent> create();
- static PassRefPtr<PopStateEvent> create(ScriptValue);
+ static PassRefPtr<PopStateEvent> create(const ScriptValue&);
static PassRefPtr<PopStateEvent> create(PassRefPtr<SerializedScriptValue>);
static PassRefPtr<PopStateEvent> create(const AtomicString&, const PopStateEventInit&);
- void initPopStateEvent(const AtomicString& type, bool canBubble, bool cancelable, ScriptValue);
+ void initPopStateEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue&);
bool isPopStateEvent() const { return true; }
SerializedScriptValue* serializedState() const { return m_serializedState.get(); }
@@ -55,7 +55,7 @@
private:
PopStateEvent();
PopStateEvent(const AtomicString&, const PopStateEventInit&);
- explicit PopStateEvent(ScriptValue);
+ explicit PopStateEvent(const ScriptValue&);
explicit PopStateEvent(PassRefPtr<SerializedScriptValue>);
ScriptValue m_state;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes