summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8/custom/V8BindingMacros.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-07-08 12:51:48 +0100
committerSteve Block <steveblock@google.com>2010-07-09 15:33:40 +0100
commitca9cb53ed1119a3fd98fafa0972ffeb56dee1c24 (patch)
treebb45155550ec013adc0ad10f4d7d354c6469b022 /WebCore/bindings/v8/custom/V8BindingMacros.h
parentd4b24d9a829ed7de70381c8b99fb75a07ab40466 (diff)
downloadexternal_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.zip
external_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.tar.gz
external_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.tar.bz2
Merge WebKit at r62496: Initial merge by git
Change-Id: Ie3da0770eca22a70a632e3571f31cfabc80facb2
Diffstat (limited to 'WebCore/bindings/v8/custom/V8BindingMacros.h')
-rw-r--r--WebCore/bindings/v8/custom/V8BindingMacros.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/WebCore/bindings/v8/custom/V8BindingMacros.h b/WebCore/bindings/v8/custom/V8BindingMacros.h
index 16c3651..4c8ecd3 100644
--- a/WebCore/bindings/v8/custom/V8BindingMacros.h
+++ b/WebCore/bindings/v8/custom/V8BindingMacros.h
@@ -28,11 +28,21 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define EXCEPTION_BLOCK(type, var, value) \
- type var; \
- { \
- v8::TryCatch block; \
- var = value; \
- if (block.HasCaught()) \
- return throwError(block.Exception()); \
+#define EXCEPTION_BLOCK(type, var, value) \
+ type var; \
+ { \
+ v8::TryCatch block; \
+ var = (value); \
+ if (block.HasCaught()) \
+ return block.ReThrow(); \
+ }
+
+#define TO_WEBCORE_STRING_EXCEPTION_BLOCK(var, value) \
+ String var; \
+ { \
+ v8::TryCatch block; \
+ v8::Handle<v8::String> v8String = (value)->ToString(); \
+ if (block.HasCaught()) \
+ return block.ReThrow(); \
+ var = v8StringToWebCoreString<String>(v8String, DoNotExternalize); \
}