Changeset 96301 in webkit


Ignore:
Timestamp:
Sep 28, 2011 11:07:17 PM (13 years ago)
Author:
haraken@chromium.org
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:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r96299 r96301  
     12011-09-28  Kentaro Hara  <haraken@chromium.org>
     2
     3        "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&"
     4        https://bugs.webkit.org/show_bug.cgi?id=68984
     5
     6        Reviewed by Darin Adler.
     7
     8        Just a follow-up fix for the bug 68345. For performance,
     9        "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&".
     10
     11        Tests: fast/events/constructors/pop-state-event-constructor.html
     12               fast/events/fire-popstate-event.html
     13
     14        * dom/PopStateEvent.cpp:
     15        (WebCore::PopStateEvent::PopStateEvent):
     16        (WebCore::PopStateEvent::create):
     17        (WebCore::PopStateEvent::initPopStateEvent):
     18        * dom/PopStateEvent.h:
     19
    1202011-09-28  Martin Robinson  <mrobinson@igalia.com>
    221
  • trunk/Source/WebCore/dom/PopStateEvent.cpp

    r96073 r96301  
    4949}
    5050
    51 PopStateEvent::PopStateEvent(ScriptValue state)
     51PopStateEvent::PopStateEvent(const ScriptValue& state)
    5252    : Event(eventNames().popstateEvent, false, true)
    5353    , m_state(state)
     
    7171}
    7272
    73 PassRefPtr<PopStateEvent> PopStateEvent::create(ScriptValue state)
     73PassRefPtr<PopStateEvent> PopStateEvent::create(const ScriptValue& state)
    7474{
    7575    return adoptRef(new PopStateEvent(state));
     
    8686}
    8787
    88 void PopStateEvent::initPopStateEvent(const AtomicString& type, bool canBubble, bool cancelable, ScriptValue state)
     88void PopStateEvent::initPopStateEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue& state)
    8989{
    9090    if (dispatched())
  • trunk/Source/WebCore/dom/PopStateEvent.h

    r96073 r96301  
    4444    virtual ~PopStateEvent();
    4545    static PassRefPtr<PopStateEvent> create();
    46     static PassRefPtr<PopStateEvent> create(ScriptValue);
     46    static PassRefPtr<PopStateEvent> create(const ScriptValue&);
    4747    static PassRefPtr<PopStateEvent> create(PassRefPtr<SerializedScriptValue>);
    4848    static PassRefPtr<PopStateEvent> create(const AtomicString&, const PopStateEventInit&);
    49     void initPopStateEvent(const AtomicString& type, bool canBubble, bool cancelable, ScriptValue);
     49    void initPopStateEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue&);
    5050    bool isPopStateEvent() const { return true; }
    5151
     
    5656    PopStateEvent();
    5757    PopStateEvent(const AtomicString&, const PopStateEventInit&);
    58     explicit PopStateEvent(ScriptValue);
     58    explicit PopStateEvent(const ScriptValue&);
    5959    explicit PopStateEvent(PassRefPtr<SerializedScriptValue>);
    6060
Note: See TracChangeset for help on using the changeset viewer.