Hello andreip, nicolasroard,
I'd like you to do a code review. Please execute
g4 diff -c 8835855
or point your web browser to
http://mondrian/8835855
(this changelist has been uploaded to Mondrian)
to review the following code:
Change 8835855 by [EMAIL PROTECTED] on 2008/11/03 11:33:48 *pending*
Workaround miscompile of an assert on Android.
For some reason assert(ImplCallback getter) is compiling to
the equivalent of assert(false) on g++-4.2.1 on Android. This
turns off the assert on Android, which is only there to check
whether a getter is registered for a property.
PRESUBMIT=passed
R=andreip,nicolasroard
[EMAIL PROTECTED]
DELTA=4 (4 added, 0 deleted, 0 changed)
OCL=8835855
Affected files ...
... //depot/googleclient/gears/opensource/gears/base/common/dispatcher.h#8 edit
4 delta lines: 4 added, 0 deleted, 0 changed
Also consider running:
g4 lint -c 8835855
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 8835855 by [EMAIL PROTECTED] on 2008/11/03 11:33:48 *pending*
Workaround miscompile of an assert on Android.
For some reason assert(ImplCallback getter) is compiling to
the equivalent of assert(false) on g++-4.2.1 on Android. This
turns off the assert on Android, which is only there to check
whether a getter is registered for a property.
Affected files ...
... //depot/googleclient/gears/opensource/gears/base/common/dispatcher.h#8 edit
==== //depot/googleclient/gears/opensource/gears/base/common/dispatcher.h#8 -
/usr/local/google/home/jripley/gears-trunk3/googleclient/gears/opensource/gears/base/common/dispatcher.h
====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/dispatcher.h
2008-11-03 11:32:08.000000000 +0000
+++ googleclient/gears/opensource/gears/base/common/dispatcher.h
2008-10-27 19:55:21.000000000 +0000
@@ -258,7 +258,11 @@
template<class T>
void Dispatcher<T>::RegisterProperty(const char *name,
ImplCallback getter, ImplCallback setter)
{
+#ifdef OS_ANDROID
+ // gcc is miscompiling this on Android. It compiles to assert(false).
+#else
assert(getter);
+#endif
DispatchId id = GetStringIdentifier(name);
GetPropertyGetterList()[id] = getter;
GetPropertySetterList()[id] = setter;