public
Description: Prototype JavaScript framework
Homepage: http://prototypejs.org/
Clone URL: git://github.com/sstephenson/prototype.git
Work around an issue with assigning a variable within a "return" statement in 
V8/Google Chrome. [#325 state:resolved]
Andrew Dupont (author)
Fri Oct 10 11:42:27 -0700 2008
commit  3e2e8d48b58061a993d1c1323c50c13554027cde
tree    2a42b826905958016de8bc05308c7669bbcb824c
parent  34ee2078f8c61272b69bc9166fd0bf7f94dde5fc
...
 
 
1
2
3
...
1
2
3
4
5
0
@@ -1,3 +1,5 @@
0
+* Work around an issue with assigning a variable within a "return" statement in V8/Google Chrome. (Chris Lear, Oleg K, Maikel Punie, Andrew Dupont)
0
+
0
 *1.6.0.3* (September 29, 2008)
0
 
0
 * Add support for the Chrome browser in jstest.rb. (Andrew Dupont)
...
160
161
162
163
 
 
164
165
166
...
160
161
162
 
163
164
165
166
167
0
@@ -160,7 +160,8 @@ Object.extend(Event, (function() {
0
   }
0
   
0
   function getCacheForID(id) {
0
-    return cache[id] = cache[id] || { };
0
+    cache[id] = cache[id] || { };
0
+    return cache[id];
0
   }
0
   
0
   function getWrappersForEventName(id, eventName) {

Comments

dperini Sat Oct 18 17:01:06 -0700 2008

Could this have been written:

return ( cache[id] = ( cache[id] || { } ) );

without causing that bug, or was it a different problem ?

kangax Sat Oct 18 21:02:18 -0700 2008

Diego, It’s fixed in Chromium now, afaik.