Hello michaeln,
I'd like you to do a code review. Please execute
g4 diff -c 11397520
or point your web browser to
http://mondrian/11397520
to review the following code:
Change 11397520 by nigel...@nigeltao-srcwingears2 on 2009/06/05 12:23:29
*pending*
Fix NULL-pointer crasher for Firefox/Windows, where the
DropTargetInterceptor fails on an IFRAME.
R=michaeln
[email protected]
DELTA=5 (5 added, 0 deleted, 0 changed)
OCL=11397520
Affected files ...
... //depot/googleclient/gears/opensource/gears/base/firefox/dom_utils.cc#8 edit
...
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc#20
edit
5 delta lines: 5 added, 0 deleted, 0 changed
Also consider running:
g4 lint -c 11397520
which verifies that the changelist doesn't introduce new style violations.
If you can't do the review, please let me know as soon as possible. During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately. Visit
http://www/eng/code_review.html for more information.
This is a semiautomated message from "g4 mail". Complaints or suggestions?
Mail [email protected].
Change 11397520 by nigel...@nigeltao-srcwingears2 on 2009/06/05 12:23:29
*pending*
Fix NULL-pointer crasher for Firefox/Windows, where the
DropTargetInterceptor fails on an IFRAME.
Affected files ...
... //depot/googleclient/gears/opensource/gears/base/firefox/dom_utils.cc#8 edit
...
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc#20
edit
==== //depot/googleclient/gears/opensource/gears/base/firefox/dom_utils.cc#8 -
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/firefox/dom_utils.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/firefox/dom_utils.cc
2009-06-05 12:23:25.000000000 +1000
+++ googleclient/gears/opensource/gears/base/firefox/dom_utils.cc
2009-06-05 11:54:21.000000000 +1000
@@ -193,6 +193,7 @@
nsCOMPtr<nsIWidget> widget;
nr = baseWindow->GetMainWidget(getter_AddRefs(widget));
if (NS_FAILED(nr)) { return nr; }
+ if (!widget) { return E_FAIL; }
*window = reinterpret_cast<NativeWindowPtr>(
widget->GetNativeData(NS_NATIVE_WINDOW));
====
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc#20
-
c:\devel\srcwingears2/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc
2009-06-05 12:23:25.000000000 +1000
+++ googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc
2009-06-05 11:57:55.000000000 +1000
@@ -556,6 +556,10 @@
#else
#if defined(WIN32)
+ if (!module_environment->drop_target_interceptor_) {
+ return false;
+ }
+
// On Windows, we do a similar thing -- the DropTargetInterceptor has the
// FileDragAndDropMetaData object.
if (module_environment->drop_target_interceptor_->