2014-07-22 01:09:02 +02:00
|
|
|
// Copyright (c) 2012 Ecma International. All rights reserved.
|
2015-07-17 17:42:45 +02:00
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
2014-07-22 01:09:02 +02:00
|
|
|
|
|
|
|
/*---
|
2014-07-25 00:41:42 +02:00
|
|
|
es5id: 10.6-13-a-2
|
2014-07-22 01:09:02 +02:00
|
|
|
description: A direct call to arguments.callee.caller should work
|
2015-05-08 17:27:52 +02:00
|
|
|
flags: [noStrict]
|
2015-09-07 18:56:02 +02:00
|
|
|
features: [caller]
|
2014-07-22 01:09:02 +02:00
|
|
|
---*/
|
|
|
|
|
|
|
|
var called = false;
|
|
|
|
|
|
|
|
function test1(flag) {
|
|
|
|
if (flag!==true) {
|
|
|
|
test2();
|
|
|
|
} else {
|
|
|
|
called = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function test2() {
|
|
|
|
if(arguments.callee.caller===undefined) {
|
|
|
|
called=true; // Extension not supported - fake it
|
|
|
|
} else {
|
|
|
|
arguments.callee.caller(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
test1();
|
|
|
|
|
2015-08-06 18:30:42 +02:00
|
|
|
assert(called, 'called !== true');
|