archives

« Bugzilla Issues Index

#105 — Missing coverage? https://bugs.webkit.org/show_bug.cgi?id=55537


<Thanks>Mark Miller</Thanks>

We might be missing coverage for the following test scenario. Add test case(s)
assuming this scenario can be mapped to ES5.1 somewhere
--------------------------------------------------------------------------
*See
http://codereview.appspot.com/4547070/diff/6003/src/com/google/caja/ses/es5shim.js?context=10&column_width=80
for the original*

61 * Workaround for https://bugs.webkit.org/show_bug.cgi?id=55537

62 *

63 * <p>This kludge is safety preserving.

64 *

65 * <p>TODO(erights): Turning on this kludge is expensive, so we

66 * should auto-detect at initialization time whether we need to on

67 * this platform.

ihab.awad2011/06/02 04:42:26Isn't this TODO already to-done by the test_* func
MarkM2011/06/05 17:38:18Done.

68 */

69 function test_MISSING_CALLEE_DESCRIPTOR() {

70 function foo(){}

71 if (Object.getOwnPropertyNames(foo).indexOf('callee') < 0) { return false; }

72 if (foo.hasOwnProperty('callee')) {

73 log('New symptom: empty strict function has own callee');

74 } else {

75 log('Phantom callee on strict functions. ' +

76 'See https://bugs.webkit.org/show_bug.cgi?id=55537');

77 }

78 return true;

79 }

80 //var TOLERATE_MISSING_CALLEE_DESCRIPTOR = false;

ihab.awad2011/06/02 04:42:26Why not just delete these commented-out lines now?
MarkM2011/06/05 17:38:18Done.

81 var TOLERATE_MISSING_CALLEE_DESCRIPTOR = test_MISSING_CALLEE_DESCRIPTOR();


We don't actually have coverage for this one, and we also shouldn't in test262...

From my read of ES5.1, the only references to 'callee' are in relation to the Arguments object circa 10.6-(13|14). Function objects are not defined to have 'callee' properties anywhere in the spec => the extension clause does not limit an implementer from doing this. Resolving this one as Won't Fix. That said, I would not be opposed to a test case in the 'best practices' section of test262 covering this.


Hi David, I think you're misreading the nature of the bug. Although the problem happens to manifest for a property named "callee", the fact that it is a spec violation has nothing to do with the name of the property. If a property named "foo" caused the same spec violation, it would still be a spec violation we should test for.

In this case, I'm mellow about it since the bug only ever manifested on Safari and it is already fixed as of WebKit Nightly.