diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-22 16:01:32 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-22 16:01:32 +0000 |
commit | dc0e90e4058b77c7feaea1bfbe61c689df076127 (patch) | |
tree | 8ae56f0a75ee287a92363e85f473caaa8a7fa081 /webkit/plugins | |
parent | 1ed5f37ec8b25545c19f416f6e161c7dc9b5d2a2 (diff) | |
download | chromium_src-dc0e90e4058b77c7feaea1bfbe61c689df076127.zip chromium_src-dc0e90e4058b77c7feaea1bfbe61c689df076127.tar.gz chromium_src-dc0e90e4058b77c7feaea1bfbe61c689df076127.tar.bz2 |
Merge 82652 - Work around the special-case handling of 0 time values (see comment).TEST=manualBUG=noneReview URL: http://codereview.chromium.org/6894023
TBR=brettw@chromium.org
BUG=80176
Review URL: http://codereview.chromium.org/6896019
git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@82658 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r-- | webkit/plugins/ppapi/ppb_flash_impl.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/webkit/plugins/ppapi/ppb_flash_impl.cc b/webkit/plugins/ppapi/ppb_flash_impl.cc index 8599d9c..d54a46c 100644 --- a/webkit/plugins/ppapi/ppb_flash_impl.cc +++ b/webkit/plugins/ppapi/ppb_flash_impl.cc @@ -78,6 +78,14 @@ double GetLocalTimeZoneOffset(PP_Instance pp_instance, PP_Time t) { if (!instance) return 0.0; + // Evil hack. The time code handles exact "0" values as special, and produces + // a "null" Time object. This will represent some date hundreds of years ago + // and will give us funny results at 1970 (there are some tests where this + // comes up, but it shouldn't happen in real life). To work around this + // special handling, we just need to give it some nonzero value. + if (t == 0.0) + t = 0.0000000001; + // We can't do the conversion here because on Linux, the localtime calls // require filesystem access prohibited by the sandbox. return instance->delegate()->GetLocalTimeZoneOffset( |