Hello nigeltao,
I'd like you to do a code review. Please execute
g4 diff -c 10119820
or point your web browser to
http://mondrian/10119820
(this changelist has been uploaded to Mondrian)
to review the following code:
Change 10119820 by n...@noel-gears on 2009/02/12 16:54:36 *pending*
On return from GetDragData() calls, check for error first, then
check the data_available state.
PRESUBMIT=passed
R=nigeltao
[email protected]
DELTA=6 (2 added, 2 deleted, 2 changed)
OCL=10119820
Affected files ...
... //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#78 edit
6 delta lines: 2 added, 2 deleted, 2 changed
Also consider running:
g4 lint -c 10119820
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 10119820 by n...@noel-gears on 2009/02/12 16:54:36 *pending*
On return from GetDragData() calls, check for error first, then
check the data_available state.
Affected files ...
... //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#78 edit
==== //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#78 -
c:\Users\noel.GOOGLE\src-gears/googleclient/gears/opensource/gears/desktop/desktop.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/desktop.cc 2009-02-12
16:51:49.000000000 +1100
+++ googleclient/gears/opensource/gears/desktop/desktop.cc 2009-02-12
16:51:38.000000000 +1100
@@ -923,12 +923,12 @@
error = STRING16(L"getDragData is not supported for this platform.");
#endif
- if (data_available) {
+ if (!error.empty()) {
+ context->SetException(error);
+ } else if (data_available) {
context->SetReturnValue(JSPARAM_OBJECT, result.get());
- } else if (error.empty()) {
+ } else {
context->SetReturnValue(JSPARAM_NULL, NULL);
- } else {
- context->SetException(error);
}
}