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:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96301
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-09-28 Kentaro Hara <haraken@chromium.org>
+
+ "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 <mrobinson@igalia.com>
[GTK] Move drag-and-drop code which can be shared with WebKit2 to WebCore
{
}
-PopStateEvent::PopStateEvent(ScriptValue state)
+PopStateEvent::PopStateEvent(const ScriptValue& state)
: Event(eventNames().popstateEvent, false, true)
, m_state(state)
, m_serializedState(0)
return adoptRef(new PopStateEvent);
}
-PassRefPtr<PopStateEvent> PopStateEvent::create(ScriptValue state)
+PassRefPtr<PopStateEvent> PopStateEvent::create(const ScriptValue& state)
{
return adoptRef(new PopStateEvent(state));
}
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;
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(); }
private:
PopStateEvent();
PopStateEvent(const AtomicString&, const PopStateEventInit&);
- explicit PopStateEvent(ScriptValue);
+ explicit PopStateEvent(const ScriptValue&);
explicit PopStateEvent(PassRefPtr<SerializedScriptValue>);
ScriptValue m_state;