Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: test/mjsunit/regress/regress-1591.js

Issue 10736030: Do not use user-defined __lookupGetter__ when generating stack trace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/messages.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-1591.js
diff --git a/test/mjsunit/regress/regress-inlining-function-literal-context.js b/test/mjsunit/regress/regress-1591.js
similarity index 81%
copy from test/mjsunit/regress/regress-inlining-function-literal-context.js
copy to test/mjsunit/regress/regress-1591.js
index 9b7f7ac76882f09e1cc837373c1bee547c645de3..69efd0bd87f2d49b185c264f3979d7c6bcad9225 100644
--- a/test/mjsunit/regress/regress-inlining-function-literal-context.js
+++ b/test/mjsunit/regress/regress-1591.js
@@ -25,29 +25,24 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --expose-gc
+var stack;
+var used_custom_lookup = false;
-function mkbaz(x) {
- function baz() {
- return function () {
- return [x];
+({
+ __lookupGetter__ : function() {
+ used_custom_lookup = true;
+ },
+
+ test : function() {
+ try {
+ f();
+ } catch (err) {
+ stack = err.stack;
}
}
- return baz;
-}
-
-var baz = mkbaz(1);
-
-function foo() {
- var f = baz();
- return f();
-}
+}).test();
-// Tenure.
-gc();
-gc();
+var expected_message = "ReferenceError: f is not defined";
+assertTrue(stack.indexOf(expected_message) >= 0);
+assertFalse(used_custom_lookup);
-assertArrayEquals([1], foo());
-assertArrayEquals([1], foo());
-%OptimizeFunctionOnNextCall(foo);
-assertArrayEquals([1], foo());
« no previous file with comments | « src/messages.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698