| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 DCHECK(args.length() == 2); | 58 DCHECK(args.length() == 2); |
| 59 CONVERT_ARG_HANDLE_CHECKED(JSFunction, callback, 0); | 59 CONVERT_ARG_HANDLE_CHECKED(JSFunction, callback, 0); |
| 60 CONVERT_ARG_HANDLE_CHECKED(Object, argument, 1); | 60 CONVERT_ARG_HANDLE_CHECKED(Object, argument, 1); |
| 61 v8::TryCatch catcher(reinterpret_cast<v8::Isolate*>(isolate)); | 61 v8::TryCatch catcher(reinterpret_cast<v8::Isolate*>(isolate)); |
| 62 // We should send a message on uncaught exception thrown during | 62 // We should send a message on uncaught exception thrown during |
| 63 // Object.observe delivery while not interrupting further delivery, thus | 63 // Object.observe delivery while not interrupting further delivery, thus |
| 64 // we make a call inside a verbose TryCatch. | 64 // we make a call inside a verbose TryCatch. |
| 65 catcher.SetVerbose(true); | 65 catcher.SetVerbose(true); |
| 66 Handle<Object> argv[] = {argument}; | 66 Handle<Object> argv[] = {argument}; |
| 67 | 67 |
| 68 // Allow stepping into the observer callback. | 68 // If we are in step-in mode, flood the handler. |
| 69 Debug* debug = isolate->debug(); | 69 isolate->debug()->EnableStepIn(); |
| 70 if (debug->is_active() && debug->IsStepping() && | |
| 71 debug->last_step_action() == StepIn) { | |
| 72 // Previous StepIn may have activated a StepOut if it was at the frame exit. | |
| 73 // In this case to be able to step into the callback again, we need to clear | |
| 74 // the step out first. | |
| 75 debug->ClearStepOut(); | |
| 76 debug->FloodWithOneShot(callback); | |
| 77 } | |
| 78 | 70 |
| 79 USE(Execution::Call(isolate, callback, isolate->factory()->undefined_value(), | 71 USE(Execution::Call(isolate, callback, isolate->factory()->undefined_value(), |
| 80 arraysize(argv), argv)); | 72 arraysize(argv), argv)); |
| 81 if (isolate->has_pending_exception()) { | 73 if (isolate->has_pending_exception()) { |
| 82 isolate->ReportPendingMessages(); | 74 isolate->ReportPendingMessages(); |
| 83 isolate->clear_pending_exception(); | 75 isolate->clear_pending_exception(); |
| 84 isolate->set_external_caught_exception(false); | 76 isolate->set_external_caught_exception(false); |
| 85 } | 77 } |
| 86 return isolate->heap()->undefined_value(); | 78 return isolate->heap()->undefined_value(); |
| 87 } | 79 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 RUNTIME_FUNCTION(Runtime_GetObjectContextNotifierPerformChange) { | 144 RUNTIME_FUNCTION(Runtime_GetObjectContextNotifierPerformChange) { |
| 153 HandleScope scope(isolate); | 145 HandleScope scope(isolate); |
| 154 DCHECK(args.length() == 1); | 146 DCHECK(args.length() == 1); |
| 155 CONVERT_ARG_HANDLE_CHECKED(JSObject, object_info, 0); | 147 CONVERT_ARG_HANDLE_CHECKED(JSObject, object_info, 0); |
| 156 | 148 |
| 157 Handle<Context> context(object_info->GetCreationContext(), isolate); | 149 Handle<Context> context(object_info->GetCreationContext(), isolate); |
| 158 return context->native_object_notifier_perform_change(); | 150 return context->native_object_notifier_perform_change(); |
| 159 } | 151 } |
| 160 } // namespace internal | 152 } // namespace internal |
| 161 } // namespace v8 | 153 } // namespace v8 |
| OLD | NEW |