From c85662167123b433a69a662212c67ce03e44a25a Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
Date: Sun, 28 Apr 2013 21:58:04 +0300
Subject: [PATCH] Bring in WebKit r74029 to fix the build with clang.

------------------------------------------------------------------------
r74029 | cwzwarich@webkit.org | 2010-12-14 18:57:14 +0200 (Tue, 14 Dec 2010) | 12 lines

Reviewed by Eric Seidel.

Clang fails to build the JSC interpreter
https://bugs.webkit.org/show_bug.cgi?id=51016

Clang does not allow indirect gotos out of scopes with cleanup. GCC 4.2 allows
them, but it does not correctly generate the cleanup, causing a leak if the
cleanup decrements a reference count.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute): Put an Identifier into its own scope.
------------------------------------------------------------------------

Change-Id: Ied16d38431715ef8f1ad9e7d1fae0921500b0ffd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
---
 .../JavaScriptCore/interpreter/Interpreter.cpp              | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp
index 4300a576..c22f536e 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp
@@ -2495,8 +2495,10 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
             vPC += OPCODE_LENGTH(op_get_by_pname);
             NEXT_INSTRUCTION();
         }
-        Identifier propertyName(callFrame, subscript.toString(callFrame));
-        result = baseValue.get(callFrame, propertyName);
+        {
+            Identifier propertyName(callFrame, subscript.toString(callFrame));
+            result = baseValue.get(callFrame, propertyName);
+        }
         CHECK_FOR_EXCEPTION();
         callFrame->r(dst) = result;
         vPC += OPCODE_LENGTH(op_get_by_pname);
-- 
GitLab