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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1478 stack_trace_for_uncaught_exceptions_frame_limit_ = frame_limit; | 1478 stack_trace_for_uncaught_exceptions_frame_limit_ = frame_limit; |
1479 stack_trace_for_uncaught_exceptions_options_ = options; | 1479 stack_trace_for_uncaught_exceptions_options_ = options; |
1480 } | 1480 } |
1481 | 1481 |
1482 | 1482 |
1483 Handle<Context> Isolate::native_context() { | 1483 Handle<Context> Isolate::native_context() { |
1484 return handle(context()->native_context()); | 1484 return handle(context()->native_context()); |
1485 } | 1485 } |
1486 | 1486 |
1487 | 1487 |
1488 Handle<Context> Isolate::global_context() { | |
1489 return handle(context()->global_object()->global_context()); | |
1490 } | |
1491 | |
1492 | |
1493 Handle<Context> Isolate::GetCallingNativeContext() { | 1488 Handle<Context> Isolate::GetCallingNativeContext() { |
1494 JavaScriptFrameIterator it(this); | 1489 JavaScriptFrameIterator it(this); |
1495 if (debug_->in_debug_scope()) { | 1490 if (debug_->in_debug_scope()) { |
1496 while (!it.done()) { | 1491 while (!it.done()) { |
1497 JavaScriptFrame* frame = it.frame(); | 1492 JavaScriptFrame* frame = it.frame(); |
1498 Context* context = Context::cast(frame->context()); | 1493 Context* context = Context::cast(frame->context()); |
1499 if (context->native_context() == *debug_->debug_context()) { | 1494 if (context->native_context() == *debug_->debug_context()) { |
1500 it.Advance(); | 1495 it.Advance(); |
1501 } else { | 1496 } else { |
1502 break; | 1497 break; |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2540 if (prev_ && prev_->Intercept(flag)) return true; | 2535 if (prev_ && prev_->Intercept(flag)) return true; |
2541 // Then check whether this scope intercepts. | 2536 // Then check whether this scope intercepts. |
2542 if ((flag & intercept_mask_)) { | 2537 if ((flag & intercept_mask_)) { |
2543 intercepted_flags_ |= flag; | 2538 intercepted_flags_ |= flag; |
2544 return true; | 2539 return true; |
2545 } | 2540 } |
2546 return false; | 2541 return false; |
2547 } | 2542 } |
2548 | 2543 |
2549 } } // namespace v8::internal | 2544 } } // namespace v8::internal |
OLD | NEW |