Status: Accepted
Owner: [email protected]
Labels: Type-Bug Priority-Medium
New issue 3404 by [email protected]: CaptureStackTrace's stack
accessors reconfigure unconfigurable properties
http://code.google.com/p/v8/issues/detail?id=3404
var e;
try { throw new Error(); } catch (x) { e = x; };
// Reconfigure e.stack to be non-configurable
var d = Object.getOwnPropertyDescriptor(e, "stack");
Object.defineProperty(e, "stack", {get:d.get, set:d.set, configurable:
false});
e.stack;
Object.getOwnPropertyDescriptor(e, "stack")
--> {get: function () { [native code] }, set: function () { [native code]
}, enumerable: false, configurable: true}
Additionally, d.get != the new .get, so this leaks into JS.
What I guess we'd want instead is something like the following:
function create_getter() {
function actual_getter() {
var result = format_stack_trace();
actual_getter = function() { return result; }
return result;
}
return function() { actual_getter(); }
}
--
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/d/optout.