From 213c3d832f1a0b0cdd54fcb31b0941479a7d06fb Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Wed, 28 Oct 2015 23:20:26 -0700 Subject: [PATCH] Make RJSStringForValue use consistent exception style --- src/js_util.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/js_util.cpp b/src/js_util.cpp index 98862bdf..c9c9a96c 100644 --- a/src/js_util.cpp +++ b/src/js_util.cpp @@ -47,10 +47,10 @@ std::string RJSStringForJSString(JSStringRef jsString) { } std::string RJSStringForValue(JSContextRef ctx, JSValueRef value) { - JSValueRef *exception; - JSStringRef jsString = JSValueToStringCopy(ctx, value, exception); + JSValueRef exception = NULL; + JSStringRef jsString = JSValueToStringCopy(ctx, value, &exception); if (!jsString) { - throw RJSException(ctx, *exception); + throw RJSException(ctx, exception); } std::string string = RJSStringForJSString(jsString); @@ -97,4 +97,3 @@ bool RJSIsValueDate(JSContextRef ctx, JSValueRef value) { static JSStringRef dateString = JSStringCreateWithUTF8CString("Date"); return RJSIsValueObjectOfType(ctx, value, dateString); } -