WebInjectedScriptHost.cpp: warning: variable ‘scope’ set but not used
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Nov 2017 08:30:28 +0000 (08:30 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Nov 2017 08:30:28 +0000 (08:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179524

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-11-10
Reviewed by Joseph Pecoraro.

r224606 has introduced a new compilation warning if not
ENABLE(PAYMENT_REQUEST).

No new tests (No behavior change).

* inspector/WebInjectedScriptHost.cpp:
(WebCore::WebInjectedScriptHost::getInternalProperties): Do not
define the variable 'scope' if not ENABLE(PAYMENT_REQUEST). Marked
a variable 'vm' with UNUSED_PARAM.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224670 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/WebInjectedScriptHost.cpp

index dbd7213..c1aa994 100644 (file)
@@ -1,3 +1,20 @@
+2017-11-10  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        WebInjectedScriptHost.cpp: warning: variable ‘scope’ set but not used
+        https://bugs.webkit.org/show_bug.cgi?id=179524
+
+        Reviewed by Joseph Pecoraro.
+
+        r224606 has introduced a new compilation warning if not
+        ENABLE(PAYMENT_REQUEST).
+
+        No new tests (No behavior change).
+
+        * inspector/WebInjectedScriptHost.cpp:
+        (WebCore::WebInjectedScriptHost::getInternalProperties): Do not
+        define the variable 'scope' if not ENABLE(PAYMENT_REQUEST). Marked
+        a variable 'vm' with UNUSED_PARAM.
+
 2017-11-10  Zan Dobersek  <zdobersek@igalia.com>
 
         [Cairo] Start grouping Cairo GraphicsContext operations behind a separate interface
index 5f2343b..555277b 100644 (file)
@@ -162,9 +162,9 @@ static JSString* jsStringForPaymentRequestState(VM& vm, ExecState* exec, Payment
 
 JSValue WebInjectedScriptHost::getInternalProperties(VM& vm, ExecState* exec, JSC::JSValue value)
 {
+#if ENABLE(PAYMENT_REQUEST)
     auto scope = DECLARE_THROW_SCOPE(vm);
 
-#if ENABLE(PAYMENT_REQUEST)
     if (PaymentRequest* paymentRequest = JSPaymentRequest::toWrapped(vm, value)) {
         unsigned index = 0;
         auto* array = constructEmptyArray(exec, nullptr);
@@ -175,6 +175,7 @@ JSValue WebInjectedScriptHost::getInternalProperties(VM& vm, ExecState* exec, JS
         return array;
     }
 #else
+    UNUSED_PARAM(vm);
     UNUSED_PARAM(exec);
     UNUSED_PARAM(value);
 #endif