======================================================================== http://mondrian.corp.google.com/file/8165297///depot/googleclient/gears/opensource/gears/base/common/js_types.cc?a=2 File //depot/googleclient/gears/opensource/gears/base/common/js_types.cc (snapshot 2) ------------------------------------ Line 2250: if (i >= GetArgumentCount()) { >From what I can tell, there are code paths where 'was_specified' won't necessarily get set. Should we set all array elements to 'false' up-front? ======================================================================== http://mondrian.corp.google.com/file/8165297///depot/googleclient/gears/opensource/gears/base/common/js_types.h?a=2 File //depot/googleclient/gears/opensource/gears/base/common/js_types.h (snapshot 2) ------------------------------------ Line 531: // of a native object. Arguments may be required or optional and these types Required and optional args can't really be interspersed freely, right? I think it's more like zero or more required arguments, followed by zero or more optional arguments. ======================================================================== http://mondrian.corp.google.com/file/8165297///depot/googleclient/gears/opensource/gears/blob/blob.cc?a=1 File //depot/googleclient/gears/opensource/gears/blob/blob.cc (snapshot 1) ------------------------------------ Line 120: if (!argv[1].was_specified) { Regarding the previous comment, I think this value may be uninitialized in certain cases? ======================================================================== http://mondrian.corp.google.com/file/8165297///depot/googleclient/gears/opensource/gears/test/testcases/internal_tests.js?a=1 File //depot/googleclient/gears/opensource/gears/test/testcases/internal_tests.js (snapshot 1) ------------------------------------ Line 141: internalTests.testPassArgumentsOptional(42, null, null); Nice additional tests. ======================================================================== http://mondrian.corp.google.com/file/8165297///depot/googleclient/gears/opensource/gears/ui/common/permissions_dialog.cc?a=1 File //depot/googleclient/gears/opensource/gears/ui/common/permissions_dialog.cc (snapshot 1) ------------------------------------ Line 163: extra_message = STRING16(L""); Is there any plan to set unspecified optional arguments to default values? ========================================================================
-- To respond, reply to this email or visit http://mondrian.corp.google.com/8165297
