Comment #8 on issue 2779 by [email protected]: Frozenness ignored by optimized ++/--
http://code.google.com/p/v8/issues/detail?id=2779

Ok, so the following under Chrome (Version 29.0.1547.22 beta) manifests the bug:

    var o = {x: 5};
    function f(o) { o.x++; }
    Object.freeze(o);
    for (var i = 0; i < 10000; i++) { f(o); }
    o.x;

The following does *not* manifest the bug:

   (function() {
      'use strict';
      var o = {x: 5};
      function f(o) { try { o.x++; } catch (e) {} }
      Object.freeze(o);
      for (var i = 0; i < 10000; i++) { f(o); }
      return o.x;
   })();

and neither does the following:

   (function() {
      'use strict';
      var o = {x: 5};
      function f(o) { o.x++; }
      Object.freeze(o);
      for (var i = 0; i < 10000; i++) { try { f(o); } catch (e) {} }
      return o.x;
   })();

Do you folks confirm that, under strict mode, the code path leading to this bug does *not* occur? Because, in Caja, we are *always* operating in strict mode.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to