Revision: 22420
Author:   [email protected]
Date:     Wed Jul 16 07:55:05 2014 UTC
Log: Error.captureStackTrace should define "stack" property as configurable.

[email protected]
BUG=393988
LOG=N

Review URL: https://codereview.chromium.org/396063008
http://code.google.com/p/v8/source/detail?r=22420

Added:
 /branches/bleeding_edge/test/mjsunit/regress/regress-crbug-393988.js
Modified:
 /branches/bleeding_edge/src/messages.js

=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/regress/regress-crbug-393988.js Wed Jul 16 07:55:05 2014 UTC
@@ -0,0 +1,8 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var o = {};
+Error.captureStackTrace(o);
+Object.defineProperty(o, "stack", { value: 1 });
+assertEquals(1, o.stack);
=======================================
--- /branches/bleeding_edge/src/messages.js     Mon Jul 14 14:05:30 2014 UTC
+++ /branches/bleeding_edge/src/messages.js     Wed Jul 16 07:55:05 2014 UTC
@@ -1144,7 +1144,8 @@
 var captureStackTrace = function captureStackTrace(obj, cons_opt) {
   // Define accessors first, as this may fail and throw.
   ObjectDefineProperty(obj, 'stack', { get: StackTraceGetter,
-                                       set: StackTraceSetter});
+                                       set: StackTraceSetter,
+                                       configurable: true });
   %CollectStackTrace(obj, cons_opt ? cons_opt : captureStackTrace);
 }

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

Reply via email to