| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index 970fdaa1ddb7db3160eaa6f6b628226278bf231d..03994cbb109944618d91d848417ca28428cf6b17 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -11353,6 +11353,26 @@ TEST(CaptureStackTraceForUncaughtException) {
|
| }
|
|
|
|
|
| +TEST(CaptureStackTraceForUncaughtExceptionAndSetters) {
|
| + v8::HandleScope scope;
|
| + LocalContext env;
|
| + v8::V8::SetCaptureStackTraceForUncaughtExceptions(true,
|
| + 1024,
|
| + v8::StackTrace::kDetailed);
|
| +
|
| + CompileRun(
|
| + "var setters = ['column', 'lineNumber', 'scriptName',\n"
|
| + " 'scriptNameOrSourceURL', 'functionName', 'isEval',\n"
|
| + " 'isConstructor'];\n"
|
| + "for (var i = 0; i < setters.length; i++) {\n"
|
| + " var prop = setters[i];\n"
|
| + " Object.prototype.__defineSetter__(prop, function() { throw prop; });\n"
|
| + "}\n");
|
| + CompileRun("throw 'exception';");
|
| + v8::V8::SetCaptureStackTraceForUncaughtExceptions(false);
|
| +}
|
| +
|
| +
|
| v8::Handle<Value> AnalyzeStackOfEvalWithSourceURL(const v8::Arguments& args) {
|
| v8::HandleScope scope;
|
| v8::Handle<v8::StackTrace> stackTrace =
|
|
|