Reviewers: Toon Verwaest,
Description:
Use local variable for getter function in Error.stack
[email protected]
BUG=
Please review this at https://chromiumcodereview.appspot.com/10911056/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/messages.js
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index
b1e048dbb4e14a8a3fb52bf75db896a2365f7cf9..e46750f05185e16b1986b60d5cbfa2abd5df60b5
100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -762,11 +762,12 @@ function GetStackTraceLine(recv, fun, pos, isGlobal) {
// Defines accessors for a property that is calculated the first time
// the property is read.
-function DefineOneShotAccessor(obj, name, value_factory) {
+function DefineOneShotAccessor(obj, name, fun) {
// Note that the accessors consistently operate on 'obj', not 'this'.
// Since the object may occur in someone else's prototype chain we
// can't rely on 'this' being the same as 'obj'.
var value;
+ var value_factory = fun;
var getter = function() {
if (value_factory == null) {
return value;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev