Pass ScriptValue by const ref where possible
authoradamk@chromium.org <adamk@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jun 2012 03:27:27 +0000 (03:27 +0000)
committeradamk@chromium.org <adamk@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jun 2012 03:27:27 +0000 (03:27 +0000)
commit2e2f59112ccc6db5d4cb4128b621d7c3bdf1bf66
treea2a50dda3a842e0c81e31dd7e5f8dcc63258f5ef
parentb7d669daa7ace9b514e18f2ee919270f44626281
Pass ScriptValue by const ref where possible
https://bugs.webkit.org/show_bug.cgi?id=89531

Reviewed by Kentaro Hara.

Previously ScriptValue was sometimes passed by value, sometimes by const ref.

For consistency and optimality, pass by const ref everywhere (except where
ScriptValue is returned from non-accessor methods).

No new tests, no change in behavior.

* bindings/js/ScriptFunctionCall.h:
(ScriptCallback):
* bindings/js/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::getHeapObjectId):
* bindings/js/ScriptProfiler.h:
(ScriptProfiler):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::setException):
* bindings/js/WorkerScriptController.h:
(WorkerScriptController):
* bindings/v8/ScriptFunctionCall.cpp:
(WebCore::ScriptCallback::ScriptCallback):
* bindings/v8/ScriptFunctionCall.h:
(ScriptCallback):
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::getHeapObjectId):
(WebCore):
* bindings/v8/ScriptProfiler.h:
(ScriptProfiler):
* bindings/v8/ScriptValue.h:
(WebCore::ScriptValue::operator==):
(WebCore::ScriptValue::operator!=):
* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::setException):
* bindings/v8/WorkerScriptController.h:
(WorkerScriptController):
* css/MediaQueryListListener.h:
(WebCore::MediaQueryListListener::create):
(WebCore::MediaQueryListListener::MediaQueryListListener):
* dom/CustomEvent.cpp:
(WebCore::CustomEvent::initCustomEvent):
* dom/CustomEvent.h:
(CustomEvent):
(WebCore::CustomEvent::detail):
* dom/MessageEvent.h:
(WebCore::MessageEvent::dataAsScriptValue):
* dom/PopStateEvent.h:
(WebCore::PopStateEvent::state):
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::wrapObject):
* inspector/InjectedScript.h:
(InjectedScript):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/ScriptFunctionCall.cpp
Source/WebCore/bindings/js/ScriptFunctionCall.h
Source/WebCore/bindings/js/ScriptProfiler.cpp
Source/WebCore/bindings/js/ScriptProfiler.h
Source/WebCore/bindings/js/WorkerScriptController.cpp
Source/WebCore/bindings/js/WorkerScriptController.h
Source/WebCore/bindings/v8/ScriptFunctionCall.cpp
Source/WebCore/bindings/v8/ScriptFunctionCall.h
Source/WebCore/bindings/v8/ScriptProfiler.cpp
Source/WebCore/bindings/v8/ScriptProfiler.h
Source/WebCore/bindings/v8/ScriptValue.h
Source/WebCore/bindings/v8/WorkerScriptController.cpp
Source/WebCore/bindings/v8/WorkerScriptController.h
Source/WebCore/css/MediaQueryListListener.h
Source/WebCore/dom/CustomEvent.cpp
Source/WebCore/dom/CustomEvent.h
Source/WebCore/dom/MessageEvent.h
Source/WebCore/dom/PopStateEvent.h
Source/WebCore/inspector/InjectedScript.cpp
Source/WebCore/inspector/InjectedScript.h