Hello andreip,
I'd like you to do a code review. Please execute
g4 diff -c 9878104
or point your web browser to
http://mondrian/9878104
to review the following code:
Change 9878104 by stevebl...@steveblock-gears1 on 2009/01/27 17:10:57 *pending*
Modifies settings dialog to be more robust to the case where the PIE
dialog bridge fails to return an arguments string.
R=andreip
[email protected]
DELTA=8 (5 added, 0 deleted, 3 changed)
OCL=9878104
Affected files ...
... //depot/googleclient/gears/opensource/gears/ui/common/html_dialog.js#14 edit
...
//depot/googleclient/gears/opensource/gears/ui/common/settings_dialog.html_m4#7
edit
8 delta lines: 5 added, 0 deleted, 3 changed
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 9878104 by stevebl...@steveblock-gears1 on 2009/01/27 17:10:57 *pending*
Modifies settings dialog to be more robust to the case where the PIE
dialog bridge fails to return an arguments string.
Affected files ...
... //depot/googleclient/gears/opensource/gears/ui/common/html_dialog.js#14 edit
...
//depot/googleclient/gears/opensource/gears/ui/common/settings_dialog.html_m4#7
edit
==== //depot/googleclient/gears/opensource/gears/ui/common/html_dialog.js#14 -
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/ui/common/html_dialog.js
====
# action=edit type=text
--- googleclient/gears/opensource/gears/ui/common/html_dialog.js
2009-02-05 17:45:38.000000000 +0000
+++ googleclient/gears/opensource/gears/ui/common/html_dialog.js
2009-01-29 16:59:42.000000000 +0000
@@ -148,7 +148,7 @@
argsString = chrome.dialogArguments;
}
- if (typeof argsString == "string") {
+ if (typeof argsString == "string" && argsString.length > 0) {
return JSON.parse(argsString);
} else {
return null;
====
//depot/googleclient/gears/opensource/gears/ui/common/settings_dialog.html_m4#7
-
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/ui/common/settings_dialog.html_m4
====
# action=edit type=text
--- googleclient/gears/opensource/gears/ui/common/settings_dialog.html_m4
2009-02-05 17:45:38.000000000 +0000
+++ googleclient/gears/opensource/gears/ui/common/settings_dialog.html_m4
2009-02-05 17:42:56.000000000 +0000
@@ -338,8 +338,13 @@
} else {
args = getArguments();
}
- loadI18nStrings(args.locale);
- permissions = args.permissions;
+ if (args) {
+ loadI18nStrings(args.locale);
+ permissions = args.permissions;
+ } else {
+ loadI18nStrings();
+ permissions = [];
+ }
originalPermissions = cloneObject(permissions);
updatePermissionsList();