| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 4827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4838 v8::HandleScope inner; | 4838 v8::HandleScope inner; |
| 4839 v8::Handle<v8::ObjectTemplate> local = v8::ObjectTemplate::New(); | 4839 v8::Handle<v8::ObjectTemplate> local = v8::ObjectTemplate::New(); |
| 4840 local->SetInternalFieldCount(1); | 4840 local->SetInternalFieldCount(1); |
| 4841 templ = v8::Persistent<v8::ObjectTemplate>::New(inner.Close(local)); | 4841 templ = v8::Persistent<v8::ObjectTemplate>::New(inner.Close(local)); |
| 4842 } | 4842 } |
| 4843 v8::Handle<v8::Object> result = templ->NewInstance(); | 4843 v8::Handle<v8::Object> result = templ->NewInstance(); |
| 4844 CHECK_EQ(1, result->InternalFieldCount()); | 4844 CHECK_EQ(1, result->InternalFieldCount()); |
| 4845 } | 4845 } |
| 4846 | 4846 |
| 4847 | 4847 |
| 4848 THREADED_TEST(CatchStackOverflow) { | 4848 // If part of the threaded tests, this test makes ThreadingTest fail |
| 4849 // on mac. |
| 4850 TEST(CatchStackOverflow) { |
| 4849 v8::HandleScope scope; | 4851 v8::HandleScope scope; |
| 4850 LocalContext context; | 4852 LocalContext context; |
| 4851 v8::TryCatch try_catch; | 4853 v8::TryCatch try_catch; |
| 4852 v8::Handle<v8::Script> script = v8::Script::Compile(v8::String::New( | 4854 v8::Handle<v8::Script> script = v8::Script::Compile(v8::String::New( |
| 4853 "function f() {" | 4855 "function f() {" |
| 4854 " return f();" | 4856 " return f();" |
| 4855 "}" | 4857 "}" |
| 4856 "" | 4858 "" |
| 4857 "f();")); | 4859 "f();")); |
| 4858 v8::Handle<v8::Value> result = script->Run(); | 4860 v8::Handle<v8::Value> result = script->Run(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 4888 CHECK_EQ(10, message->GetLineNumber()); | 4890 CHECK_EQ(10, message->GetLineNumber()); |
| 4889 CHECK_EQ(91, message->GetStartPosition()); | 4891 CHECK_EQ(91, message->GetStartPosition()); |
| 4890 CHECK_EQ(92, message->GetEndPosition()); | 4892 CHECK_EQ(92, message->GetEndPosition()); |
| 4891 CHECK_EQ(2, message->GetStartColumn()); | 4893 CHECK_EQ(2, message->GetStartColumn()); |
| 4892 CHECK_EQ(3, message->GetEndColumn()); | 4894 CHECK_EQ(3, message->GetEndColumn()); |
| 4893 v8::String::AsciiValue line(message->GetSourceLine()); | 4895 v8::String::AsciiValue line(message->GetSourceLine()); |
| 4894 CHECK_EQ(" throw 'nirk';", *line); | 4896 CHECK_EQ(" throw 'nirk';", *line); |
| 4895 v8::String::AsciiValue name(message->GetScriptResourceName()); | 4897 v8::String::AsciiValue name(message->GetScriptResourceName()); |
| 4896 CHECK_EQ("test.js", *name); | 4898 CHECK_EQ("test.js", *name); |
| 4897 } | 4899 } |
| OLD | NEW |