Author: [EMAIL PROTECTED]
Date: Mon Sep 29 09:10:17 2008
New Revision: 3691
Modified:
changes/jat/oophm-branch/plugins/xpcom/FFSessionHandler.cpp
changes/jat/oophm-branch/plugins/xpcom/JavaObject.cpp
Log:
Check to make sure 8-bit strings are treated as UTF8, clear private pointer
on disconnect.
Modified: changes/jat/oophm-branch/plugins/xpcom/FFSessionHandler.cpp
==============================================================================
--- changes/jat/oophm-branch/plugins/xpcom/FFSessionHandler.cpp (original)
+++ changes/jat/oophm-branch/plugins/xpcom/FFSessionHandler.cpp Mon Sep 29
09:10:17 2008
@@ -49,6 +49,9 @@
FFSessionHandler::FFSessionHandler(HostChannel* channel)
: SessionData(channel, this, getJSContext()), jsObjectId(0),
jsObjectsById(NULL), stringObjectClass(NULL) {
+ if (!JS_CStringsAreUTF8()) {
+ Debug::log(Debug::Error) << "UTF8 is not in use" << Debug::flush;
+ }
FFSessionHandler::registerHandler(ctx, this);
jsObjectsById = JS_NewArrayObject(ctx, 0, NULL);
if (!(jsObjectsById && JS_AddNamedRoot(ctx,
&jsObjectsById, "jsObjectsById"))) {
Modified: changes/jat/oophm-branch/plugins/xpcom/JavaObject.cpp
==============================================================================
--- changes/jat/oophm-branch/plugins/xpcom/JavaObject.cpp (original)
+++ changes/jat/oophm-branch/plugins/xpcom/JavaObject.cpp Mon Sep 29
09:10:17 2008
@@ -257,6 +257,7 @@
if (data) {
int objectId = JavaObject::getObjectId(ctx, obj);
data->freeJavaObject(objectId);
+ JS_SetPrivate(ctx, obj, NULL);
}
}
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---