| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 7935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7946 "var r;" | 7946 "var r;" |
| 7947 "p.chain(function() { r = 'resolved'; }," | 7947 "p.chain(function() { r = 'resolved'; }," |
| 7948 " function(e) { r = 'rejected' + e; });"); | 7948 " function(e) { r = 'rejected' + e; });"); |
| 7949 CHECK( | 7949 CHECK( |
| 7950 CompileRun("r")->Equals(context, v8_str("rejectedrejection")).FromJust()); | 7950 CompileRun("r")->Equals(context, v8_str("rejectedrejection")).FromJust()); |
| 7951 CHECK_EQ(1, exception_event_counter); | 7951 CHECK_EQ(1, exception_event_counter); |
| 7952 } | 7952 } |
| 7953 | 7953 |
| 7954 | 7954 |
| 7955 TEST(DebugBreakOnExceptionInObserveCallback) { | 7955 TEST(DebugBreakOnExceptionInObserveCallback) { |
| 7956 i::FLAG_harmony_object_observe = true; |
| 7956 DebugLocalContext env; | 7957 DebugLocalContext env; |
| 7957 v8::Isolate* isolate = env->GetIsolate(); | 7958 v8::Isolate* isolate = env->GetIsolate(); |
| 7958 v8::HandleScope scope(isolate); | 7959 v8::HandleScope scope(isolate); |
| 7959 v8::Debug::SetDebugEventListener(isolate, &DebugEventCountException); | 7960 v8::Debug::SetDebugEventListener(isolate, &DebugEventCountException); |
| 7960 v8::Local<v8::Context> context = env.context(); | 7961 v8::Local<v8::Context> context = env.context(); |
| 7961 // Break on uncaught exception | 7962 // Break on uncaught exception |
| 7962 ChangeBreakOnException(false, true); | 7963 ChangeBreakOnException(false, true); |
| 7963 exception_event_counter = 0; | 7964 exception_event_counter = 0; |
| 7964 | 7965 |
| 7965 v8::Local<v8::FunctionTemplate> fun = | 7966 v8::Local<v8::FunctionTemplate> fun = |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8054 CompileRun("function foo() {}; foo();"); | 8055 CompileRun("function foo() {}; foo();"); |
| 8055 --after_compile_handler_depth; | 8056 --after_compile_handler_depth; |
| 8056 } | 8057 } |
| 8057 | 8058 |
| 8058 | 8059 |
| 8059 TEST(NoInterruptsInDebugListener) { | 8060 TEST(NoInterruptsInDebugListener) { |
| 8060 DebugLocalContext env; | 8061 DebugLocalContext env; |
| 8061 v8::Debug::SetDebugEventListener(env->GetIsolate(), NoInterruptsOnDebugEvent); | 8062 v8::Debug::SetDebugEventListener(env->GetIsolate(), NoInterruptsOnDebugEvent); |
| 8062 CompileRun("void(0);"); | 8063 CompileRun("void(0);"); |
| 8063 } | 8064 } |
| OLD | NEW |