Commit 66a16bd6 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Use local variable for getter function in Error.stack

R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/10911056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 74aa15bf
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment