Changeset 96030 in webkit


Ignore:
Timestamp:
Sep 26, 2011 4:21:42 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Set but unused variables cleanup in v8 bindings (gcc 4.6)
https://bugs.webkit.org/show_bug.cgi?id=68079

Patch by Max Perepelitsyn <pph34r@gmail.com> on 2011-09-26
Reviewed by Adam Barth.

Source/WebCore:

Test: http/tests/websocket/tests/hybi/send-object-tostring-check.html

  • bindings/scripts/CodeGeneratorV8.pm:
  • bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:

(WebCore::ConfigureV8TestMediaQueryListListenerTemplate):

  • bindings/scripts/test/V8/V8TestObj.cpp:

(WebCore::ConfigureV8TestObjTemplate):

  • bindings/v8/WorkerScriptDebugServer.cpp:

(WebCore::WorkerScriptDebugServer::addListener):

  • bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:

(WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):

  • bindings/v8/custom/V8WebSocketCustom.cpp:

(WebCore::V8WebSocket::sendCallback):

LayoutTests:

  • http/tests/websocket/tests/hybi/send-object-tostring-check-expected.txt: Added.
  • http/tests/websocket/tests/hybi/send-object-tostring-check.html: Added.
Location:
trunk
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r96026 r96030  
     12011-09-26  Max Perepelitsyn  <pph34r@gmail.com>
     2
     3        Set but unused variables cleanup in v8 bindings (gcc 4.6)
     4        https://bugs.webkit.org/show_bug.cgi?id=68079
     5
     6        Reviewed by Adam Barth.
     7
     8        * http/tests/websocket/tests/hybi/send-object-tostring-check-expected.txt: Added.
     9        * http/tests/websocket/tests/hybi/send-object-tostring-check.html: Added.
     10
    1112011-09-26  Tony Chang  <tony@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r96026 r96030  
     12011-09-26  Max Perepelitsyn  <pph34r@gmail.com>
     2
     3        Set but unused variables cleanup in v8 bindings (gcc 4.6)
     4        https://bugs.webkit.org/show_bug.cgi?id=68079
     5
     6        Reviewed by Adam Barth.
     7
     8        Test: http/tests/websocket/tests/hybi/send-object-tostring-check.html
     9
     10        * bindings/scripts/CodeGeneratorV8.pm:
     11        * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
     12        (WebCore::ConfigureV8TestMediaQueryListListenerTemplate):
     13        * bindings/scripts/test/V8/V8TestObj.cpp:
     14        (WebCore::ConfigureV8TestObjTemplate):
     15        * bindings/v8/WorkerScriptDebugServer.cpp:
     16        (WebCore::WorkerScriptDebugServer::addListener):
     17        * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
     18        (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
     19        * bindings/v8/custom/V8WebSocketCustom.cpp:
     20        (WebCore::V8WebSocket::sendCallback):
     21
    1222011-09-26  Tony Chang  <tony@chromium.org>
    223
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r95203 r96030  
    21952195        push(@implContent, <<END);
    21962196        0, 0);
     2197END
     2198    }
     2199   
     2200    AddToImplIncludes("wtf/UnusedParam.h");
     2201    push(@implContent, <<END);
    21972202    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    21982203END
    2199         AddToImplIncludes("wtf/UnusedParam.h");
    2200     }
    22012204
    22022205    if ($dataNode->extendedAttributes->{"CanBeConstructed"} || $dataNode->extendedAttributes->{"CustomConstructor"} || $dataNode->extendedAttributes->{"V8CustomConstructor"} || $dataNode->extendedAttributes->{"Constructer"}) {
     
    22102213    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    22112214    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
     2215    UNUSED_PARAM(instance); // In some cases, it will not be used.
     2216    UNUSED_PARAM(proto); // In some cases, it will not be used.
    22122217END
    22132218    }
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp

    r95901 r96030  
    3131#include "V8IsolatedContext.h"
    3232#include "V8Proxy.h"
     33#include <wtf/UnusedParam.h>
    3334
    3435namespace WebCore {
     
    6263        0, 0,
    6364        TestMediaQueryListListenerCallbacks, WTF_ARRAY_LENGTH(TestMediaQueryListListenerCallbacks));
     65    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    6466    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    6567    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
     68    UNUSED_PARAM(instance); // In some cases, it will not be used.
     69    UNUSED_PARAM(proto); // In some cases, it will not be used.
    6670   
    6771
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp

    r95901 r96030  
    4646#include <wtf/RefCounted.h>
    4747#include <wtf/RefPtr.h>
     48#include <wtf/UnusedParam.h>
    4849
    4950#if ENABLE(Condition1)
     
    14091410        TestObjAttrs, WTF_ARRAY_LENGTH(TestObjAttrs),
    14101411        TestObjCallbacks, WTF_ARRAY_LENGTH(TestObjCallbacks));
     1412    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    14111413    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    14121414    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
     1415    UNUSED_PARAM(instance); // In some cases, it will not be used.
     1416    UNUSED_PARAM(proto); // In some cases, it will not be used.
    14131417   
    14141418    if (RuntimeEnabledFeatures::enabledAtRuntimeAttr1Enabled()) {
  • trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.cpp

    r95901 r96030  
    8888    m_listenersMap.set(workerContext, listener);
    8989   
     90    // TODO: Should we remove |proxy|? It looks like unused now.
    9091    WorkerContextExecutionProxy* proxy = workerContext->script()->proxy();
    9192    if (!proxy)
    9293        return;
    93     v8::Handle<v8::Context> context = proxy->context();
    9494
    9595    v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("getWorkerScripts")));
  • trunk/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp

    r95901 r96030  
    110110    }
    111111    if (!ec)
    112         imp->setLength(value->Uint32Value(), ec);
     112        imp->setLength(newLength, ec);
    113113
    114114    V8Proxy::setDOMException(ec);
  • trunk/Source/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp

    r95901 r96030  
    138138        if (tryCatch.HasCaught())
    139139            return throwError(tryCatch.Exception());
    140         result = webSocket->send(toWebCoreString(message), ec);
     140        result = webSocket->send(toWebCoreString(stringMessage), ec);
    141141    }
    142142    if (ec)
Note: See TracChangeset for help on using the changeset viewer.