summaryrefslogtreecommitdiffstats
path: root/mojo
diff options
context:
space:
mode:
authortsepez@chromium.org <tsepez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-16 23:49:31 +0000
committertsepez@chromium.org <tsepez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-16 23:49:31 +0000
commita69a588eace1dc7a69fafb2340972259df8fae54 (patch)
tree8ebdce101793fbf55223024af4123de2c193469d /mojo
parenta538a133307305a6b0d52787bce640721b8a01f0 (diff)
downloadchromium_src-a69a588eace1dc7a69fafb2340972259df8fae54.zip
chromium_src-a69a588eace1dc7a69fafb2340972259df8fae54.tar.gz
chromium_src-a69a588eace1dc7a69fafb2340972259df8fae54.tar.bz2
Fix 64-bit data type encoding from JavaScript.
There appears to be a typo in the division; not enough zeros. Also, there is incorrect sign-extension for negative values in many cases due the use of (x | 0) as a poor-man's floor(). Review URL: https://codereview.chromium.org/237753003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264351 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo')
-rw-r--r--mojo/public/js/bindings/codec.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/mojo/public/js/bindings/codec.js b/mojo/public/js/bindings/codec.js
index 59ac7d1..c60dfb1 100644
--- a/mojo/public/js/bindings/codec.js
+++ b/mojo/public/js/bindings/codec.js
@@ -25,7 +25,7 @@ define("mojo/public/js/bindings/codec",
function store64(memory, pointer, val) {
store32(memory, pointer, val);
- var high = (val / 0x10000) | 0;
+ var high = Math.floor(val / 0x100000000);
store32(memory, pointer + 4, high);
}