OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/debug/debug.h" | 5 #include "src/debug/debug.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 | 451 |
452 // Create the debugger context. | 452 // Create the debugger context. |
453 HandleScope scope(isolate_); | 453 HandleScope scope(isolate_); |
454 ExtensionConfiguration no_extensions; | 454 ExtensionConfiguration no_extensions; |
455 // TODO(yangguo): we rely on the fact that first context snapshot is usable | 455 // TODO(yangguo): we rely on the fact that first context snapshot is usable |
456 // as debug context. This dependency is gone once we remove | 456 // as debug context. This dependency is gone once we remove |
457 // debug context completely. | 457 // debug context completely. |
458 static const int kFirstContextSnapshotIndex = 0; | 458 static const int kFirstContextSnapshotIndex = 0; |
459 Handle<Context> context = isolate_->bootstrapper()->CreateEnvironment( | 459 Handle<Context> context = isolate_->bootstrapper()->CreateEnvironment( |
460 MaybeHandle<JSGlobalProxy>(), v8::Local<ObjectTemplate>(), &no_extensions, | 460 MaybeHandle<JSGlobalProxy>(), v8::Local<ObjectTemplate>(), &no_extensions, |
461 kFirstContextSnapshotIndex, v8::DeserializeInternalFieldsCallback(), | 461 kFirstContextSnapshotIndex, v8::DeserializeEmbedderFieldsCallback(), |
462 DEBUG_CONTEXT); | 462 DEBUG_CONTEXT); |
463 | 463 |
464 // Fail if no context could be created. | 464 // Fail if no context could be created. |
465 if (context.is_null()) return false; | 465 if (context.is_null()) return false; |
466 | 466 |
467 debug_context_ = Handle<Context>::cast( | 467 debug_context_ = Handle<Context>::cast( |
468 isolate_->global_handles()->Create(*context)); | 468 isolate_->global_handles()->Create(*context)); |
469 | 469 |
470 feature_tracker()->Track(DebugFeatureTracker::kActive); | 470 feature_tracker()->Track(DebugFeatureTracker::kActive); |
471 | 471 |
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2452 isolate_->Throw(*isolate_->factory()->NewEvalError( | 2452 isolate_->Throw(*isolate_->factory()->NewEvalError( |
2453 MessageTemplate::kNoSideEffectDebugEvaluate)); | 2453 MessageTemplate::kNoSideEffectDebugEvaluate)); |
2454 } | 2454 } |
2455 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_); | 2455 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_); |
2456 isolate_->debug()->UpdateHookOnFunctionCall(); | 2456 isolate_->debug()->UpdateHookOnFunctionCall(); |
2457 isolate_->debug()->side_effect_check_failed_ = false; | 2457 isolate_->debug()->side_effect_check_failed_ = false; |
2458 } | 2458 } |
2459 | 2459 |
2460 } // namespace internal | 2460 } // namespace internal |
2461 } // namespace v8 | 2461 } // namespace v8 |
OLD | NEW |