Status: New
Owner: ----

New issue 2866 by [email protected]: Possibly incorrect order of evaluation with __defineGetter__
http://code.google.com/p/v8/issues/detail?id=2866

In running the following:

a = 100;
x = function() {
    console.log(a);
    return function(){};
};
x()(a=50);

the output will be 100, indicating that the first function is run before
any changes are to a are made. When running this code however,

a = 100;
x = function(){};
x.prototype.__defineGetter__("_", function() {
    console.log(a);
    return function(){};
});
x._(a=50);

the output will be 50, indicating that the value of a is changed before
the getter is run. This does not occur in other JavaScript engines such as
SpiderMonkey (which outputs 100 for the later), and may be incorrect behaviour.


--
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