From 5fc48d42bb356bb4e43ff42c42392cc451e36e01 Mon Sep 17 00:00:00 2001 From: "daniel.boelzle%sun.com" Date: Wed, 15 Aug 2007 15:23:26 +0000 Subject: [PATCH] Bug 391062 - jsDate property is not correctly invalidated upon calDateTime modification; r=mickey git-svn-id: svn://10.0.0.236/trunk@232116 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/calendar/base/src/calDateTime.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mozilla/calendar/base/src/calDateTime.cpp b/mozilla/calendar/base/src/calDateTime.cpp index bccdd72e0f8..5a7cec60ba5 100644 --- a/mozilla/calendar/base/src/calDateTime.cpp +++ b/mozilla/calendar/base/src/calDateTime.cpp @@ -773,7 +773,8 @@ calDateTime::GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, if (JSVAL_IS_STRING(id)) { nsDependentString const jsid( - NS_STATIC_CAST(PRUnichar const*, JS_GetStringChars(JSVAL_TO_STRING(id))), + NS_REINTERPRET_CAST(PRUnichar const*, + JS_GetStringChars(JSVAL_TO_STRING(id))), JS_GetStringLength(JSVAL_TO_STRING(id))); if (jsid.EqualsLiteral("jsDate")) { PRTime tmp, thousand; @@ -808,7 +809,8 @@ calDateTime::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, if (JSVAL_IS_STRING(id)) { nsDependentString const jsid( - NS_STATIC_CAST(PRUnichar const*, JS_GetStringChars(JSVAL_TO_STRING(id))), + NS_REINTERPRET_CAST(PRUnichar const*, + JS_GetStringChars(JSVAL_TO_STRING(id))), JS_GetStringLength(JSVAL_TO_STRING(id))); if (jsid.EqualsLiteral("jsDate") && vp) { JSObject *dobj; @@ -903,8 +905,9 @@ calDateTime::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext * cx, if (JSVAL_IS_STRING(id)) { JSString *str = JSVAL_TO_STRING(id); - nsDependentString const name(NS_STATIC_CAST(PRUnichar const*, JS_GetStringChars(str)), - JS_GetStringLength(str)); + nsDependentString const name( + NS_REINTERPRET_CAST(PRUnichar const*, JS_GetStringChars(str)), + JS_GetStringLength(str)); if (name.EqualsLiteral("jsDate")) { *_retval = JS_DefineUCProperty(cx, obj, JS_GetStringChars(str), JS_GetStringLength(str),