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/v8.h" | 5 #include "src/v8.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/debug/debug-evaluate.h" | 9 #include "src/debug/debug-evaluate.h" |
10 #include "src/debug/debug-frames.h" | 10 #include "src/debug/debug-frames.h" |
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 if (!instance_filter->IsUndefined()) { | 1392 if (!instance_filter->IsUndefined()) { |
1393 for (PrototypeIterator iter(isolate, obj); !iter.IsAtEnd(); | 1393 for (PrototypeIterator iter(isolate, obj); !iter.IsAtEnd(); |
1394 iter.Advance()) { | 1394 iter.Advance()) { |
1395 if (iter.GetCurrent() == instance_filter) { | 1395 if (iter.GetCurrent() == instance_filter) { |
1396 obj = NULL; // Don't add this object. | 1396 obj = NULL; // Don't add this object. |
1397 break; | 1397 break; |
1398 } | 1398 } |
1399 } | 1399 } |
1400 } | 1400 } |
1401 | 1401 |
| 1402 // Do not expose the global object directly. |
| 1403 if (obj->IsJSGlobalObject()) { |
| 1404 obj = JSGlobalObject::cast(obj)->global_proxy(); |
| 1405 } |
| 1406 |
1402 if (obj != NULL) { | 1407 if (obj != NULL) { |
1403 // Valid reference found add to instance array if supplied an update | 1408 // Valid reference found add to instance array if supplied an update |
1404 // count. | 1409 // count. |
1405 if (instances != NULL && count < instances_size) { | 1410 if (instances != NULL && count < instances_size) { |
1406 instances->set(count, obj); | 1411 instances->set(count, obj); |
1407 } | 1412 } |
1408 last = obj; | 1413 last = obj; |
1409 count++; | 1414 count++; |
1410 } | 1415 } |
1411 } | 1416 } |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1822 return *isolate->factory()->undefined_value(); | 1827 return *isolate->factory()->undefined_value(); |
1823 } | 1828 } |
1824 | 1829 |
1825 | 1830 |
1826 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 1831 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
1827 UNIMPLEMENTED(); | 1832 UNIMPLEMENTED(); |
1828 return NULL; | 1833 return NULL; |
1829 } | 1834 } |
1830 } // namespace internal | 1835 } // namespace internal |
1831 } // namespace v8 | 1836 } // namespace v8 |
OLD | NEW |