Author: [EMAIL PROTECTED]
Date: Thu Oct 2 08:28:44 2008
New Revision: 3698
Modified:
changes/jat/oophm-branch/plugins/xpcom/FFSessionHandler.cpp
changes/jat/oophm-branch/user/src/com/google/gwt/dom/client/DOMImplMozilla.java
Log:
Fix DOM issue in OOPHM branch, GC crash because FFSessionHandler gets
destroyed before the JSContext destroy callback occurs.
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 Thu Oct 2
08:28:44 2008
@@ -102,7 +102,7 @@
FFSessionHandler::~FFSessionHandler(void) {
Debug::log(Debug::Debugging) << "FFSessionHandler::~FFSessionHandler" <<
Debug::flush;
- // disconnect();
+ disconnect();
}
void FFSessionHandler::freeValue(HostChannel& channel, int idCount, const
int* ids) {
@@ -534,8 +534,8 @@
}
static JSBool contextCallback(JSContext* ctx, uintN contextOp) {
- // Debug::log(Debug::Spam) << "contextCallback contextOp=" << contextOp
- // << Debug::flush;
+ Debug::log(Debug::Debugging) << "contextCallback contextOp=" << contextOp
+ << Debug::flush;
if (contextOp == JSCONTEXT_DESTROY) {
std::map<JSContext*, FFSessionHandler*>::iterator it;
it = contextMap.find(ctx);
Modified:
changes/jat/oophm-branch/user/src/com/google/gwt/dom/client/DOMImplMozilla.java
==============================================================================
---
changes/jat/oophm-branch/user/src/com/google/gwt/dom/client/DOMImplMozilla.java
(original)
+++
changes/jat/oophm-branch/user/src/com/google/gwt/dom/client/DOMImplMozilla.java
Thu Oct 2 08:28:44 2008
@@ -45,10 +45,12 @@
// Firefox 3 is actively throwing errors when getBoxObjectFor() is
called,
// so we use getBoundingClientRect() whenever possible (but it's not
// supported on older versions). If changing this code, make sure to
check
- // the museum entry for issue 1932.
+ // the museum entry for issue 1932. In FF3, this expression appears to
+ // be capable of being a float, so we coerce to int.
if (Element.prototype.getBoundingClientRect) {
- return elem.getBoundingClientRect().top +
-
@com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollTop;
+ return (elem.getBoundingClientRect().top +
+
@com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollTop)
+ | 0;
} else {
// We cannot use DOMImpl here because offsetLeft/Top return erroneous
// values when overflow is not visible. We have to difference
screenX
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---